mirror of
https://github.com/joyieldInc/predixy.git
synced 2025-12-24 22:46:41 +08:00
fix private connection leak
This commit is contained in:
parent
dacf3fb30c
commit
ace6ed2941
@ -215,7 +215,6 @@ void Handler::postAcceptConnectionEvent()
|
||||
auto cp = mConnPool[s->server()->id()];
|
||||
s->setStatus(Connection::LogicError);
|
||||
addPostEvent(s, Multiplexor::ErrorEvent);
|
||||
cp->putPrivateConnection(s);
|
||||
c->detachConnectConnection();
|
||||
s->detachAcceptConnection();
|
||||
}
|
||||
@ -276,6 +275,9 @@ void Handler::postConnectConnectionEvent()
|
||||
s->status(), s->statusStr());
|
||||
mEventLoop->delSocket(s);
|
||||
s->close(this);
|
||||
if (!s->isShared()) {
|
||||
mConnPool[s->server()->id()]->putPrivateConnection(s);
|
||||
}
|
||||
if (c) {
|
||||
addPostEvent(c, Multiplexor::ErrorEvent);
|
||||
s->detachAcceptConnection();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user