mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
Fix #7
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user