This commit is contained in:
Whale
2019-10-17 13:39:10 +08:00
committed by GitHub
parent 565247f62b
commit d153560998

View File

@@ -24,8 +24,7 @@ class RobotWSConnection extends WSConnection
$this->sub_type = $sub_type; $this->sub_type = $sub_type;
foreach (ConnectionManager::getAll("robot") as $k => $v) { foreach (ConnectionManager::getAll("robot") as $k => $v) {
if ($v->getQQ() == $this->getQQ() && $k != $this->fd && $v->getSubType() == $this->getSubType()) { if ($v->getQQ() == $this->getQQ() && $k != $this->fd && $v->getSubType() == $this->getSubType()) {
$this->getServer()->close($k); $v->close();
ConnectionManager::remove($k);
} }
} }
if ($sub_type != "event") { if ($sub_type != "event") {
@@ -131,4 +130,4 @@ class RobotWSConnection extends WSConnection
public function getSubType() { public function getSubType() {
return $this->sub_type; return $this->sub_type;
} }
} }