remove null-dereference when socket closed by two threads

This commit is contained in:
ehouse 2005-03-21 05:30:12 +00:00
parent 94df6e022c
commit 95772d3ad1

View file

@ -91,6 +91,7 @@ void
RemoveSocketRefs( int socket )
{
CookieRef* cref = getCookieRefForSocket( socket );
if ( cref != NULL ) {
cref->Remove( socket );
SocketMap::iterator iter = gSocketStuff.find( socket );
@ -101,6 +102,9 @@ RemoveSocketRefs( int socket )
ForgetCref( cref );
delete cref;
}
} else {
logf( "socket already dead" );
}
}
/*****************************************************************************