I create socket connection each time user logs into my application. This means if they open new tabs within same browser window multiple socket connections are established for each browser tabs. Problem occurs when I close these tabs; inconsistently /disconnect inbound service is called. This means for some connection /disconnect is not called and for some it is called. I can't reproduce this consistently (sometimes it called /disconnect sometimes it doesn't).
I am relying on /disconnect to clean up temporal objects created(stored in datastore) for a particular channel so I am left with all the OpenChannel objects for which /disconnect is never called.
This happens with Chrome and FireFox and never with IE. Am I using API correctly? Should there ever be one socket connection per browser window rather than tab? (If this is the case then if we store token in the cookie, do we re-establish connection with this token? Wouldn't this count as two connection per client id?
Thanks.