XSocket issue - Open in new tab closes all other connections in other tabs

10 views
Skip to first unread message

Sibinkumar B

unread,
Nov 18, 2021, 11:47:11 AM11/18/21
to XSockets.NET Developer forum
Hi,
I have upgraded my XSockets-JsApi library from 3.0.3 to 6.4.0. I am using below code now to create the client object.

var client = new xsockets.client("ws://url/Realtime");

I am facing an issue when I open the same URL in multiple tabs in the same browser; every time when I open the URL in a new tab it is calling the onClose method of the clients in other tabs. 

client.onClose  = function (event) {
                console.log('XSocket closing logic');
            };

The above issue was not there in the previous version(3.0.3), it was calling the onClose method when I close the connection(lets say when I stop the application in Visual Studio).

In the server side I am using XSockets 5.8.0-preview001 version and I have created my controller by inheriting from XSocketController

public class RealtimeController : XSocketController{}

Please advice what changes I need to make in my code to address the issue.

Kind Regards,

Sibin
Reply all
Reply to author
Forward
0 new messages