Hi,
We just updated from XSockets 4.2.0 to 5.1.2 and started experiencing problems. When a client disconnect from the server, all other clients are also disconnected.
We ended up creating an entirely new project to test it out with minimal code, and are getting the same problem.
We're running:
XSockets.Owin.Host 5.1.2
XSockets.JsApi 5.0.1
With the following startup code:
using Microsoft.Owin;
using Owin;
using XSockets.Owin.Host;
[assembly: OwinStartup(typeof(Xsockets5Demo.Startup))]
namespace Xsockets5Demo
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseXSockets();
}
}
}
And the following client side code:
<script src="Scripts/XSockets.latest.min.js"></script>
<script>
var conn = new XSockets.WebSocket('ws://localhost:52059', ['Test']);
conn.onconnected = () => {
log.innerHTML += 'Open';
};
conn.ondisconnected = () => {
log.innerHTML += 'Disconnected';
};
</script>
<div id="log"></div>
We then connected two clients (different browsers) and on one of them we executed "conn.webSocket.close()" in the console. Both clients were disconnected.
To be sure, we also tried downgrading the new test project to 4.2.0, and then it worked, only closing the one client.
Is there a change in version 5 we're missing or whats going wrong here?