mirror of
https://github.com/caozhiyi/CppNet.git
synced 2026-01-26 16:30:05 +08:00
fix pingpong test.
This commit is contained in:
@@ -153,7 +153,11 @@ void PosixRWSocket::OnDisConnect(Event*, uint16_t err) {
|
||||
SetShutdown();
|
||||
|
||||
// peer disconnect or connection break.
|
||||
if (_event && !(err != CEC_SUCCESS)) {
|
||||
if (_event && err != CEC_SUCCESS) {
|
||||
auto actions = GetEventActions();
|
||||
if (actions) {
|
||||
actions->DelEvent(_event);
|
||||
}
|
||||
OsHandle::Close(_sock);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user