From: imarom Date: Mon, 27 Feb 2017 13:36:38 +0000 (+0200) Subject: missing some lines from previous commit X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=e56cadaa90bcf67e874741a78ebcde477749700b;p=trex.git missing some lines from previous commit Signed-off-by: imarom --- diff --git a/src/publisher/trex_publisher.cpp b/src/publisher/trex_publisher.cpp index f5437378..8eae5579 100644 --- a/src/publisher/trex_publisher.cpp +++ b/src/publisher/trex_publisher.cpp @@ -73,25 +73,22 @@ TrexPublisher::Create(uint16_t port, bool disable){ void TrexPublisher::Delete(){ if (m_publisher) { - + /* before calling zmq_close set the linger property to zero (othersie zmq_ctx_destroy might hang forever) */ int val = 0; zmq_setsockopt(m_publisher, ZMQ_LINGER, &val, sizeof(val)); - + zmq_close (m_publisher); m_publisher = NULL; } -/* Deadlock inside ZMQ better to have leakage in termination - see - https://trex-tgn.cisco.com/youtrack/issue/trex-361 */ -#if 0 if (m_context) { zmq_ctx_destroy (m_context); m_context = NULL; } -#endif + }