1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

(trunk libT) #3164 "crash in tr_peerIoReconnect()" -- after attempting to reconnect, re-enable the libevent monitoring if the socket can't be created.

This commit is contained in:
Charles Kerr 2010-04-23 23:48:52 +00:00
parent 4f5670f9c0
commit 52bad7b8a0

View file

@ -648,10 +648,10 @@ tr_peerIoReconnect( tr_peerIo * io )
io->socket = tr_netOpenPeerSocket( session, &io->addr, io->port, io->isSeed );
event_set( &io->event_read, io->socket, EV_READ, event_read_cb, io );
event_set( &io->event_write, io->socket, EV_WRITE, event_write_cb, io );
event_enable( io, pendingEvents );
if( io->socket >= 0 )
{
event_enable( io, pendingEvents );
tr_netSetTOS( io->socket, session->peerSocketTOS );
maybeSetCongestionAlgorithm( io->socket, session->peer_congestion_algorithm );
return 0;