This commit is contained in:
2023-08-16 00:39:55 +08:00
parent fdfe210fef
commit c8f7a7dcb2
2 changed files with 28 additions and 1 deletions
+5 -1
View File
@@ -64,7 +64,11 @@ class Pool implements PoolInterface
if (!isset($this->_connections[$name])) {
throw new Exception('Channel is not exists.');
}
return $this->_connections[$name];
$channel = $this->_connections[$name];
if ($channel->isClose()) {
$channel->reconnect();
}
return $channel;
}