Loading src/event/epoll.cpp +8 −5 Changes for src/event/epoll.cpp: 8 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -324,9 +324,7 @@ namespace netplus { if (!ccon) { return; } { std::lock_guard<std::mutex> lock(ccon->event_mutex); std::unique_lock<std::mutex> conn_lock(ccon->event_mutex); if (ccon->csock) { try { Loading @@ -340,14 +338,19 @@ namespace netplus { evconnection->DisconnectEvent(*ccon, tid, args); ccon->csock->close(); CONNECTIONS.erase(ccon->csock->fd()); } catch (NetException &e) { throw e; } CONNECTIONS.erase(ccon->csock->fd()); conn_lock.unlock(); throw e; } } _Events[pos].data.ptr = nullptr; conn_lock.unlock(); delete ccon; } Loading src/event/kqueue.cpp +5 −6 Changes for src/event/kqueue.cpp: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -340,9 +340,7 @@ namespace netplus { if (!ccon) { return; } { std::lock_guard<std::mutex> lock(ccon->event_mutex); std::unique_lock<std::mutex> conn_lock(ccon->event_mutex); if (ccon->csock) { try { Loading @@ -363,16 +361,17 @@ namespace netplus { ccon->csock->close(); CONNECTIONS.erase(ccon->csock->fd()); } catch (NetException &e) { throw e; } CONNECTIONS.erase(ccon->csock->fd()); conn_lock.unlock(); throw e; } } _Events[pos].udata = nullptr; conn_lock.unlock(); delete ccon; } Loading Loading
src/event/epoll.cpp +8 −5 Changes for src/event/epoll.cpp: 8 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -324,9 +324,7 @@ namespace netplus { if (!ccon) { return; } { std::lock_guard<std::mutex> lock(ccon->event_mutex); std::unique_lock<std::mutex> conn_lock(ccon->event_mutex); if (ccon->csock) { try { Loading @@ -340,14 +338,19 @@ namespace netplus { evconnection->DisconnectEvent(*ccon, tid, args); ccon->csock->close(); CONNECTIONS.erase(ccon->csock->fd()); } catch (NetException &e) { throw e; } CONNECTIONS.erase(ccon->csock->fd()); conn_lock.unlock(); throw e; } } _Events[pos].data.ptr = nullptr; conn_lock.unlock(); delete ccon; } Loading
src/event/kqueue.cpp +5 −6 Changes for src/event/kqueue.cpp: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -340,9 +340,7 @@ namespace netplus { if (!ccon) { return; } { std::lock_guard<std::mutex> lock(ccon->event_mutex); std::unique_lock<std::mutex> conn_lock(ccon->event_mutex); if (ccon->csock) { try { Loading @@ -363,16 +361,17 @@ namespace netplus { ccon->csock->close(); CONNECTIONS.erase(ccon->csock->fd()); } catch (NetException &e) { throw e; } CONNECTIONS.erase(ccon->csock->fd()); conn_lock.unlock(); throw e; } } _Events[pos].udata = nullptr; conn_lock.unlock(); delete ccon; } Loading