Many threads on application.onDisconnect not firing but seemingly no solution
I've dug some threads up and included links at the end of this post. Have some more work to do researching it but figured I'd get the ball rolling.
Essentially one can't depend on application.onDisconnect() firing at the close of a client's browser. It happens sometimes. But with some apps, it just doesn't happen at all. I've watched the FMS management console as I've repeatedly opened and closed a particular app I'm developing. Connections don't die with each browser close. The net result is a piling up of connections. My app has a "connected users" list in it. It gets packed with multiple connections from the same client.
Eventually, after 5-10 mins, the connections disappear on their own. Not good though. One of the functions in my app lets someone select a user in the list and send a direct chat. This feature isn't working because disconnections are not registering real time. Some of the people in the user list are not really there anymore.
I get the problem in both IE8 and FireFox 3.5.3 on FMS 3.52. Others have reported the problem in various browsers and FMS versions going way back. Problem's been around for some time.
This guy has the same problem and a nice description, although he experienced only in IE:
onDisconnect Errors in Internet Explorer: (http://www.flashnewz.com/ondisconnect-errors-in-internet-explorer/)
After reading the accounts at the links gathered below, I get the feeling it might not necessarily be an FMS problem alone, but rather some combo of browser, SWFObject implementation, and perhaps particular features used (or not used) in the client ActionScript. Nobody's seemed to nail down the precise combination though.
Pretty much a show stopper. Has anyone developed viable work arounds?
Thread: onDisconnect() IE7 problem: (http://fmsguru.com/forum/messages.cfm?threadid=EEC6D52A-BAB2-526D-5CD9FF490332B8D8)
onDisconnect Not Firing in IE6/7 With SWFObject 2: (http://www.flashcomguru.com/index.cfm/2008/8/7/swfobject-problem-ie-fms)
Do not call onDisconnect when closing browser: (http://www.wowzamedia.com/forums/showthread.php?t=5521)
BUG -Flash Media Interactive Server 3: (http://www.justskins.com/forums/bug-flash-media-interactive-server-3-a-141282.html)
onDisconnect Event in FMS 2.0: (http://forums.adobe.com/thread/98366)
Topic: Detecting ungraceful disconnects? (http://www.flashcomguru.com/forum/forum_posts.asp?TID=2848&PN=0&TPN=2)
Why Flash Media Server does not call application.onDisconnect handler: (http://stackoverflow.com/questions/359727/why-flash-media-server-does-not-call-application-ondisconnect-handler)
