mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2024-10-07 08:32:16 +08:00
Don't delay disconnected state update if already stopped
This commit is contained in:
parent
420ed719e8
commit
75e6332500
@ -310,7 +310,7 @@ static void _ConnectedTimerCallBack(CFRunLoopTimerRef timer, void* info) {
|
||||
_activeConnections -= 1;
|
||||
if (_activeConnections == 0) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (_disconnectDelay > 0.0) {
|
||||
if ((_disconnectDelay > 0.0) && (_source != NULL)) {
|
||||
CFRunLoopTimerSetNextFireDate(_connectedTimer, CFAbsoluteTimeGetCurrent() + _disconnectDelay);
|
||||
} else {
|
||||
[self _didDisconnect];
|
||||
|
Loading…
Reference in New Issue
Block a user