Skip to main content
Inspiring
Dec 29, 2007 4:02 PM UTC
Question

browser causes server side onDisconnect issues

when a client presses the browser back button instead of closing the window then FMS 20+ seconds to fire its onDisconnect servers side function but if the user closes the window then FMS responds right away with the onDisconnect function.....does anybody know a fix for this issue?
    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Participant
    Jan 2, 2008 3:18 PM UTC
    the onDisconnect event always was a headache... try to unplug the network cable from a client connected to the FMS, you will see that the event is never fired. I hope this bug will be fixed in FMS3

    from my experience, the best way to avoid this issues is to make keep-alive calls from the client to the server, then in server-side you can know when a client is not responding for a while and explicitly disconnect it.

    hope it helps

    Agustín.
    Translate
    calmchessplayer
    Inspiring
    Jan 6, 2008 5:28 AM UTC
    could you supply me with example code.....a simple client and server side script would be great I can't find any tutorials or how tos on the internet to learn from I'll post a tutorial if you help me write the code on this subject......just posting the AS in text here will be fine i can create the UI without a problem
    Translate