I have a simple library that keeps track number of concurrent connections for each user to prevent abuse.
For RTMP whenever play() is called, add one to the hashtable, and onDisconnect() is called, subtract one from the hashtable.
It has been working great until recently. According to the log file, sometime the client just went away without onDisconnect being called. Concurrent count for the user will keep going up for each play request until it reaches the limit.
Am I doing this right? Or do I have to use other method to detect client disconnect?