Skip to content

Commit

Permalink
Optimizaion
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Dec 1, 2024
1 parent 32063d1 commit 8d37177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,8 @@ public function onWorkerMessage($connection, $data)
// 在一台服务器上businessWorker->name不能相同
if (isset($this->_workerConnections[$key])) {
self::error("Gateway: Worker->name conflict. Key:{$key}");
$connection->close();
return;
// 关闭老的,使用新的
$this->_workerConnections[$key]->close();
}
$connection->key = $key;
$this->_workerConnections[$key] = $connection;
Expand Down

0 comments on commit 8d37177

Please sign in to comment.