File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 33 "type" : " library" ,
44 "license" : " MIT" ,
55 "require" : {
6- "workerman/webman-framework" : " ^2.0 || dev-master" ,
6+ "workerman/webman-framework" : " ^2.1 || dev-master" ,
77 "topthink/think-container" : " ^2.0" ,
88 "psr/simple-cache" : " ^1.0|^2.0|^3.0"
99 },
Original file line number Diff line number Diff line change 1717use think \helper \Str ;
1818use Throwable ;
1919use Webman \Context ;
20- use Webman \Coroutine \Pool ;
20+ use Workerman \Coroutine \Coroutine ;
21+ use Workerman \Coroutine \Pool ;
2122
2223abstract class Manager
2324{
@@ -163,7 +164,7 @@ protected function createDriver(string $name): mixed
163164 $ connection = static ::$ pools [$ name ]->get ();
164165 Context::set ($ key , $ connection );
165166 } finally {
166- Context:: onDestroy (function () use ($ connection , $ name ) {
167+ Coroutine:: defer (function () use ($ connection , $ name ) {
167168 try {
168169 $ connection && static ::$ pools [$ name ]->put ($ connection );
169170 } catch (Throwable ) {
Original file line number Diff line number Diff line change 1616use DateInterval ;
1717use DateTimeInterface ;
1818use RedisException ;
19- use Webman \Coroutine \Pool ;
19+ use Workerman \Coroutine \Pool ;
2020use Webman \ThinkCache \Driver ;
2121
2222class Redis extends Driver
You can’t perform that action at this time.
0 commit comments