fix peer-mgr.c:1092 asset failure reported by Waldorf_

This commit is contained in:
Charles Kerr 2007-10-03 02:46:15 +00:00
parent 1f1605986c
commit 0f550043fd
1 changed files with 8 additions and 6 deletions

View File

@ -1089,13 +1089,15 @@ tr_peerMgrStartTorrent( tr_peerMgr * manager,
t = getExistingTorrent( manager, torrentHash );
assert( t != NULL );
assert( !t->isRunning );
assert( t->reconnectTimer == NULL );
assert( t->rechokeTimer == NULL );
assert( ( t->isRunning != 0 ) == ( t->reconnectTimer != NULL ) );
assert( ( t->isRunning != 0 ) == ( t->rechokeTimer != NULL ) );
t->isRunning = 1;
t->reconnectTimer = tr_timerNew( t->manager->handle, reconnectPulse, t, RECONNECT_PERIOD_MSEC );
t->rechokeTimer = tr_timerNew( t->manager->handle, rechokePulse, t, RECHOKE_PERIOD_MSEC );
if( !t->isRunning )
{
t->isRunning = 1;
t->reconnectTimer = tr_timerNew( t->manager->handle, reconnectPulse, t, RECONNECT_PERIOD_MSEC );
t->rechokeTimer = tr_timerNew( t->manager->handle, rechokePulse, t, RECHOKE_PERIOD_MSEC );
}
managerUnlock( manager );
}