mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
fix peer-mgr.c:1092 asset failure reported by Waldorf_
This commit is contained in:
parent
1f1605986c
commit
0f550043fd
1 changed files with 8 additions and 6 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue