Close socket before deleting it.
Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/97c265ee Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/97c265ee Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/97c265ee Branch: refs/heads/feature/GEODE-3143 Commit: 97c265eef15f17deb312cda051c20a62bbb4c30b Parents: 4fe5813 Author: fdaniel7 <fdan...@amdocs.com> Authored: Wed Jun 28 11:13:53 2017 +0300 Committer: fdaniel7 <fdan...@amdocs.com> Committed: Wed Jun 28 11:13:53 2017 +0300 ---------------------------------------------------------------------- src/cppcache/src/TcpConn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/97c265ee/src/cppcache/src/TcpConn.cpp ---------------------------------------------------------------------- diff --git a/src/cppcache/src/TcpConn.cpp b/src/cppcache/src/TcpConn.cpp index 3c3747d..b80aa51 100644 --- a/src/cppcache/src/TcpConn.cpp +++ b/src/cppcache/src/TcpConn.cpp @@ -269,7 +269,7 @@ void TcpConn::connect() { ACE_OS::snprintf(msg, 256, "TcpConn::connect failed with errno: %d: %s", lastError, ACE_OS::strerror(lastError)); // this is only called by constructor, so we must delete m_io - GF_SAFE_DELETE(m_io); + close(); throw GeodeIOException(msg); } int rc = this->m_io->enable(ACE_NONBLOCK);