this seems to fix the double-start bug reported by joshe

This commit is contained in:
Charles Kerr 2007-08-17 04:50:45 +00:00
parent e6eaf4ff20
commit d5cfbf9426
1 changed files with 4 additions and 3 deletions

View File

@ -42,10 +42,10 @@
#define DEFAULT_ANNOUNCE_INTERVAL_MSEC (MINUTES_TO_MSEC(20))
/* this is how long we'll leave a scrape request hanging before timeout */
#define SCRAPE_TIMEOUT_INTERVAL_SEC 10
#define SCRAPE_TIMEOUT_INTERVAL_SEC 60
/* this is how long we'll leave a tracker request hanging before timeout */
#define REQ_TIMEOUT_INTERVAL_SEC 15
#define REQ_TIMEOUT_INTERVAL_SEC 60
/* the number of peers that is our goal */
#define NUMWANT 150
@ -863,6 +863,7 @@ onTrackerResponse( struct evhttp_request * req, void * vtor )
}
tor->httpConn = NULL;
tor->httpReq = NULL;
if( isStopped )
publishStopped( tor );
@ -972,7 +973,7 @@ tr_trackerStart( Torrent * tor )
{
tr_peerIdNew( tor->peer_id, sizeof(tor->peer_id) );
if( !tor->reannounceTag )
if( !tor->reannounceTag && !tor->httpReq )
sendTrackerRequest( tor, "started" );
}