Merge pull request #2591 from laplaceyang/pr_cancel_timer_in_reconnect

fix bug: coredump if set linger and immediate together
This commit is contained in:
BJovke 2017-06-02 10:25:18 +02:00 committed by GitHub
commit 99805931e4

View File

@ -506,6 +506,11 @@ void zmq::session_base_t::reconnect ()
pipe->terminate (false); pipe->terminate (false);
terminating_pipes.insert (pipe); terminating_pipes.insert (pipe);
pipe = NULL; pipe = NULL;
if (has_linger_timer) {
cancel_timer (linger_timer_id);
has_linger_timer = false;
}
} }
reset (); reset ();