This commit is contained in:
2021-01-19 18:47:38 +08:00
parent d5e0bea13a
commit 335be2ed9c
+6
View File
@@ -126,6 +126,12 @@ abstract class Pool extends Component
}
Context::setContext('create:connect:' . $coroutineName, 1);
$client = call_user_func($createHandler, ...$config);
if (!Context::inCoroutine()) {
Context::deleteId('create:connect:' . $coroutineName);
return $client;
}
$this->push($coroutineName, call_user_func($createHandler, ...$config));
Context::deleteId('create:connect:' . $coroutineName);