Don't request more peers if stopping (or changing ports).
This commit is contained in:
parent
738149e629
commit
52e66c96f8
|
@ -237,6 +237,7 @@ static tr_http_t * getQuery( tr_tracker_t * tc )
|
|||
uint64_t down;
|
||||
uint64_t up;
|
||||
char * start;
|
||||
int numwant = 50;
|
||||
|
||||
down = tor->downloadedCur;
|
||||
up = tor->uploadedCur;
|
||||
|
@ -258,6 +259,7 @@ static tr_http_t * getQuery( tr_tracker_t * tc )
|
|||
else if( tc->stopped || 0 < tc->newPort )
|
||||
{
|
||||
event = "&event=stopped";
|
||||
numwant = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -285,11 +287,11 @@ static tr_http_t * getQuery( tr_tracker_t * tc )
|
|||
"downloaded=%"PRIu64"&"
|
||||
"left=%"PRIu64"&"
|
||||
"compact=1&"
|
||||
"numwant=50&"
|
||||
"numwant=%d&"
|
||||
"key=%s"
|
||||
"%s",
|
||||
inf->trackerAnnounce, start, tor->hashString, tc->id,
|
||||
tc->bindPort, up, down, left, tor->key, event );
|
||||
tc->bindPort, up, down, left, numwant, tor->key, event );
|
||||
}
|
||||
|
||||
static void readAnswer( tr_tracker_t * tc, const char * data, int len )
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<integer>3</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>456</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
|
|
Binary file not shown.
|
@ -1039,7 +1039,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
{
|
||||
//if cannot trash, just delete it (will work if it is on a remote volume)
|
||||
if (![[NSFileManager defaultManager] removeFileAtPath: path handler: nil])
|
||||
NSLog([@"Could not trash " stringByAppendingString: path]);
|
||||
NSLog(@"Could not trash %@", path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue