mirror of
https://github.com/danog/dns.git
synced 2024-11-26 20:14:51 +01:00
Work around OPCache issue
This commit is contained in:
parent
f9f0c6cdc8
commit
e0fc018ad7
@ -157,7 +157,10 @@ abstract class Socket {
|
||||
}
|
||||
|
||||
try {
|
||||
return yield Promise\timeout($deferred->promise(), $timeout);
|
||||
// Work around an OPCache issue that returns an empty array with "return yield ...", so assign to a variable first.
|
||||
// See https://github.com/amphp/dns/issues/58.
|
||||
$result = yield Promise\timeout($deferred->promise(), $timeout);
|
||||
return $result;
|
||||
} catch (Amp\TimeoutException $exception) {
|
||||
unset($this->pending[$id]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user