diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-03-13 17:53:27 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-04-17 11:24:07 +0100 |
| commit | 7450656bf3a7aa3b4cb2732cc44f293ebc5080ef (patch) | |
| tree | 86d396faba86a118464a1e7e6c3f6cc22d969a3a | |
| parent | 1c66fe04bcebf50102abe6c96322f0fa5ce740ec (diff) | |
| download | monzero-core-7450656bf3a7aa3b4cb2732cc44f293ebc5080ef.tar.gz monzero-core-7450656bf3a7aa3b4cb2732cc44f293ebc5080ef.tar.xz monzero-core-7450656bf3a7aa3b4cb2732cc44f293ebc5080ef.zip | |
net_node: fix connection leak when ping fails with bad response
If there is no comms error, but the response is not as expected,
close would not be called.
| -rw-r--r-- | src/p2p/net_node.inl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 6278db891..0fab40322 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1319,6 +1319,7 @@ namespace nodetool if(rsp.status != PING_OK_RESPONSE_STATUS_TEXT || pr != rsp.peer_id) { LOG_PRINT_CC_L2(ping_context, "back ping invoke wrong response \"" << rsp.status << "\" from" << ip << ":" << port << ", hsh_peer_id=" << pr_ << ", rsp.peer_id=" << rsp.peer_id); + m_net_server.get_config_object().close(ping_context.m_connection_id); return; } m_net_server.get_config_object().close(ping_context.m_connection_id); |
