Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
I am trying to make chat app and i am trying to figure out best way to keep track of user connectionIDs. I am saving connectionID OnConnectedAsync to database and OdDisconnectedAsync removing That connectionID from database. My problem is when user exits browser or tab and then i have invalid ConnectionID in database. What would be easyiest way to fix this?

What I have tried:

Tried using
window.onbeforeunload

js event but it doesnt activate on browser close.
Thank you for trying to help!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900