I am testing a chat client written using the XIFF API and I am seeing something which causes me concern. If I enter a room for the first time, I get a room join event and a subject change event containing the subject for the room. And if I leave the room and re-enter it, I get the same. But if I enter the room and then I get disconnected (e.g. a network problem or the user simply closes the browser the client is running in) before officially leaving the room, the server appears to continue to think I am in the room. And worse, this appears to cause a problem when I re-enter the room after re-launching the client … I don’‘t get any of the events (room join, subject change, etc.) … it is as if the server thinks I was already there so it doesn’'t send me any of the events. What is going on here? How is one to deal with the very real possibility that a client will get terminated abnormally or experience a network disconnect? I would have thought the server would have removed the user from any rooms they were in when they lose their connection to the server, but it certainly does not appear that this is the case? Any explanations, suggestions, or advice?