[Live-devel] windows winsock error 10038
Ross Finlayson
finlayson at live555.com
Tue Jun 18 12:55:36 PDT 2013
> The problem I found is in RTPInterface.cpp file
>
> -> SocketDescriptor::tcpReadHandler1 line 422
> If readSocket fails (-1) it triggers a deletion of the SocketDescriptor object
>
Correct.
>
> However this is leaving a dangling pointer in the HashTable in RTPInterface (lookupSocketDescriptor)
>
Incorrect - because the "SocketDescriptor" destructor calls "removeSocketDescription()", which will remove the "SocketDescriptor" object from the hash table.
(Note that the "SocketDescriptor" destructor also calls "turnOffBackgroundReadHandling()" on the socket, so that this socket will no longer get used in the event loop's "select()".)
As I noted earlier, the "bad file descriptor" error (or other socket error) in "select()" is caused by a socket getting closed somewhere without "turnOffBackgroundReadHandling()" also being called for the socket. It's conceivable that there is a bug in the LIVE555 code somewhere that is causing this to happen - in which case I invite people to try to track it down. However, what you described above is not it.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130618/121860e0/attachment.html>
More information about the live-devel
mailing list