We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3345cc2 commit 358813cCopy full SHA for 358813c
src/Manager.php
@@ -17,7 +17,6 @@
17
use think\helper\Str;
18
use Throwable;
19
use Webman\Context;
20
-use Workerman\Coroutine\Coroutine;
21
use Workerman\Coroutine\Pool;
22
23
abstract class Manager
@@ -164,7 +163,7 @@ protected function createDriver(string $name): mixed
164
163
$connection = static::$pools[$name]->get();
165
Context::set($key, $connection);
166
} finally {
167
- Coroutine::defer(function () use ($connection, $name) {
+ Context::onDestroy(function () use ($connection, $name) {
168
try {
169
$connection && static::$pools[$name]->put($connection);
170
} catch (Throwable) {
0 commit comments