1
0
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:
Niklas Keller 2017-07-01 10:52:56 +02:00
parent f9f0c6cdc8
commit e0fc018ad7

View File

@ -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]);