mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
possibly fix r3457 crash reported by chrissturm
This commit is contained in:
parent
212470560e
commit
78b5c81253
1 changed files with 8 additions and 5 deletions
|
@ -806,8 +806,8 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
|
|||
|
||||
if( 200<=responseCode && responseCode<=299 )
|
||||
{
|
||||
dbgmsg( t, "request succeeded. reannouncing in %d seconds", t->announceIntervalSec );
|
||||
|
||||
dbgmsg( t, "request succeeded. reannouncing in %d seconds",
|
||||
t->announceIntervalSec );
|
||||
t->manualAnnounceAllowedAt = time(NULL)
|
||||
+ t->announceMinIntervalSec;
|
||||
t->reannounceTimer = tr_timerNew( t->handle,
|
||||
|
@ -829,6 +829,7 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
|
|||
/* The request could not be understood by the server due to
|
||||
* malformed syntax. The client SHOULD NOT repeat the
|
||||
* request without modifications. */
|
||||
if( req && req->response_code_line )
|
||||
publishErrorMessage( t, req->response_code_line );
|
||||
t->manualAnnounceAllowedAt = ~(time_t)0;
|
||||
t->reannounceTimer = NULL;
|
||||
|
@ -841,6 +842,7 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
|
|||
* cases in which the server is aware that it has erred or is
|
||||
* incapable of performing the request. So we pause a bit and
|
||||
* try again. */
|
||||
if( req && req->response_code_line )
|
||||
publishWarning( t, req->response_code_line );
|
||||
t->manualAnnounceAllowedAt = ~(time_t)0;
|
||||
t->reannounceTimer = tr_timerNew( t->handle, onRetry, t, 15 * 1000 );
|
||||
|
@ -850,6 +852,7 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
|
|||
dbgmsg( t, "unhandled condition... retrying in 120 seconds." );
|
||||
|
||||
/* WTF did we get?? */
|
||||
if( req && req->response_code_line )
|
||||
publishErrorMessage( t, req->response_code_line );
|
||||
t->manualAnnounceAllowedAt = ~(time_t)0;
|
||||
t->reannounceTimer = tr_timerNew( t->handle, onRetry, t, 120 * 1000 );
|
||||
|
|
Loading…
Reference in a new issue