mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
stop timers and notification checking on quit right away
This commit is contained in:
@@ -588,11 +588,11 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
[fBadger clearBadge];
|
||||
|
||||
//wait for running transfers to stop and for NAT to be disabled (5 second timeout)
|
||||
NSDate * start = [NSDate date];
|
||||
NSDate * startDate = [NSDate date];
|
||||
|
||||
tr_close(fLib);
|
||||
|
||||
while ([start timeIntervalSinceNow] >= -5.0 && tr_handleStatus(fLib)->natTraversalStatus != TR_NAT_TRAVERSAL_DISABLED)
|
||||
while ([startDate timeIntervalSinceNow] >= -5.0 && tr_handleStatus(fLib)->natTraversalStatus != TR_NAT_TRAVERSAL_DISABLED)
|
||||
usleep(100000);
|
||||
|
||||
//remaining calls the same as dealloc
|
||||
|
||||
@@ -73,8 +73,7 @@
|
||||
[[UKKQueue sharedFileWatcher] addPath: [autoPath stringByExpandingTildeInPath]];
|
||||
|
||||
//set bind port
|
||||
int bindPort = [fDefaults integerForKey: @"BindPort"];
|
||||
tr_setBindPort(fHandle, bindPort);
|
||||
tr_setBindPort(fHandle, [fDefaults integerForKey: @"BindPort"]);
|
||||
|
||||
//set NAT
|
||||
tr_natTraversalEnable(fHandle, [fDefaults boolForKey: @"NatTraversal"]);
|
||||
|
||||
Reference in New Issue
Block a user