Skip to main content
Inspiring
December 29, 2007
Question

browser causes server side onDisconnect issues

  • December 29, 2007
  • 1 reply
  • 432 views
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 has been closed for replies.

    1 reply

    Participant
    January 2, 2008
    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.
    calmchessplayer
    Inspiring
    January 6, 2008
    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