1
0
mirror of https://github.com/danog/dns.git synced 2025-01-22 13:31:12 +01:00

Prevent multiple unloading of server

This commit is contained in:
Bob Weinand 2016-02-29 19:58:53 +01:00
parent a3b2c9099f
commit 2ca9766dff

View File

@ -463,6 +463,11 @@ function __loadNewServer($state, $uri) {
}
function __unloadServer($state, $serverId, $error = null) {
// Might already have been unloaded (especially if multiple requests happen)
if (!isset($state->serverIdMap[$serverId])) {
return;
}
$server = $state->serverIdMap[$serverId];
\Amp\cancel($server->watcherId);
unset(