From e56cadaa90bcf67e874741a78ebcde477749700b Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 27 Feb 2017 15:36:38 +0200 Subject: missing some lines from previous commit Signed-off-by: imarom --- src/publisher/trex_publisher.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 + } -- cgit 1.2.3-korg