mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-02-22 00:00:05 +08:00
Don't delay disconnected state update if already stopped
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user