mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Fix coroutine check in Client class to handle negative CIDs correctly
This commit is contained in:
1 parent
da2237950b
commit
cf12c216dc
1 file changed
+1
-3
+1
-3
@@ -9,8 +9,6 @@ use Swoole\Coroutine\Client as CoroutineClient;
|
||||
use stdClass;
|
||||
use Swoole\Coroutine;
|
||||
|
||||
|
||||
|
||||
class Client
|
||||
{
|
||||
/**
|
||||
@@ -92,7 +90,7 @@ class Client
|
||||
if ($useCoroutine) {
|
||||
try {
|
||||
$cid = \Swoole\Coroutine::getCid();
|
||||
if ($cid === false || $cid === 0) {
|
||||
if ($cid === false || $cid < 0) {
|
||||
$useCoroutine = false;
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
Reference in new issue
Block a user