diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-08-07 16:09:52 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-08-07 16:09:52 +0200 |
commit | 8378180cbb69c44fdd84f9ee05620bf8744cce48 (patch) | |
tree | 7ea012a0efb13b078369fae15baa1bcdcf7a8092 | |
parent | 24230515f5b1652186af7748268f1cfb27f5215f (diff) |
Minor bug in vtcp_listener fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r-- | src/vtcp_listener.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vtcp_listener.cpp b/src/vtcp_listener.cpp index 685b992..9a897e4 100644 --- a/src/vtcp_listener.cpp +++ b/src/vtcp_listener.cpp @@ -43,10 +43,11 @@ zmq::vtcp_listener_t::vtcp_listener_t (io_thread_t *io_thread_, zmq::vtcp_listener_t::~vtcp_listener_t () { - zmq_assert (s != retired_fd); - int rc = ::close (s); - errno_assert (rc == 0); - s = retired_fd; + if (s != retired_fd) { + int rc = ::close (s); + errno_assert (rc == 0); + s = retired_fd; + } } int zmq::vtcp_listener_t::set_address (const char *addr_) |