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:
parent
a3b2c9099f
commit
2ca9766dff
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user