January 29, 2009

Bug in the dispatching of OnConnectionClosed() in release 5.2.4 of the server framework

A client has just reported a bug in version 5.2.4 of the server framework. The bug has, possibly, been present since 5.2.2 and relates to the dispatch of OnConnectionClosed() callbacks when a socket is released.

If a socket is still valid, i.e. it hasn't been previously closed, when the socket is released for the last time then part of the clean up is to close the socket. Your code is informed of this by the OnConnectionClosed() callback being called. However, if this callback IS called as part of socket clean up then you can't call AddRef() on the socket that you're passed in OnConnectionClosed() and the socket will throw an exception because the reference count is being incremented from zero.

There will shortly be a 5.2.5 release which fixes this.


Share this entry: Email it! | bookmark it! | digg it! | reddit!

Posted by Len at January 29, 2009 08:31 AM | Comments (0) | Categories : Socket Servers
Comments
Post a comment









Remember personal info?




Enter this code in the box below to prove that you're not some kind of automated spam robot...