Skip to content

Commit 0db27e7

Browse files
limingxinleohuangzhhui
authored andcommitted
Fix 找不到$client的BUG (swoft-cloud/swoft-component#199)
1 parent f435d08 commit 0db27e7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Service.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ public function call(string $func, array $params)
109109
$result = $packer->unpack($result);
110110
$data = $packer->checkData($result);
111111
} catch (\Throwable $throwable) {
112-
$client && $client->close();
112+
if (isset($client) && $client instanceof AbstractServiceConnection) {
113+
$client->close();
114+
}
113115
if (empty($fallback)) {
114116
throw $throwable;
115117
}

0 commit comments

Comments
 (0)