summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2014-05-07 13:59:02 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2014-05-07 13:59:02 -0700
commita4e6a803f34b349f051a3ff2bd3cf5b2140cfbab (patch)
tree3a50bb7b3599d3d10885425b4b8af51aa75bf7aa
parentc1c9f0fbe22e9fb03d892c30970f6c3f583cad47 (diff)
zeromq: set ZMQ_LINGER to 0 for all blocks
-rw-r--r--gr-zeromq/lib/pub_sink_impl.cc2
-rw-r--r--gr-zeromq/lib/pull_source_impl.cc2
-rw-r--r--gr-zeromq/lib/push_sink_impl.cc2
-rw-r--r--gr-zeromq/lib/rep_sink_impl.cc2
-rw-r--r--gr-zeromq/lib/req_source_impl.cc2
5 files changed, 10 insertions, 0 deletions
diff --git a/gr-zeromq/lib/pub_sink_impl.cc b/gr-zeromq/lib/pub_sink_impl.cc
index 07002395f5..9cd115da79 100644
--- a/gr-zeromq/lib/pub_sink_impl.cc
+++ b/gr-zeromq/lib/pub_sink_impl.cc
@@ -45,6 +45,8 @@ namespace gr {
{
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_PUB);
+ int time = 0;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
d_socket->bind(address);
}
diff --git a/gr-zeromq/lib/pull_source_impl.cc b/gr-zeromq/lib/pull_source_impl.cc
index 8d90b0ead7..2498eeedc3 100644
--- a/gr-zeromq/lib/pull_source_impl.cc
+++ b/gr-zeromq/lib/pull_source_impl.cc
@@ -46,6 +46,8 @@ namespace gr {
d_timeout = timeout >= 0 ? (int)(timeout*1e6) : 0;
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_PULL);
+ int time = 0;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
d_socket->connect (address);
}
diff --git a/gr-zeromq/lib/push_sink_impl.cc b/gr-zeromq/lib/push_sink_impl.cc
index 11a4967a50..5acc3c555e 100644
--- a/gr-zeromq/lib/push_sink_impl.cc
+++ b/gr-zeromq/lib/push_sink_impl.cc
@@ -46,6 +46,8 @@ namespace gr {
d_blocking = blocking;
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_PUSH);
+ int time = 0;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
d_socket->bind (address);
}
diff --git a/gr-zeromq/lib/rep_sink_impl.cc b/gr-zeromq/lib/rep_sink_impl.cc
index 7e5f43df4c..d3d8f81790 100644
--- a/gr-zeromq/lib/rep_sink_impl.cc
+++ b/gr-zeromq/lib/rep_sink_impl.cc
@@ -46,6 +46,8 @@ namespace gr {
d_timeout = timeout >= 0 ? (int)(timeout*1e6) : 0;
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_REP);
+ int time = 0;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
d_socket->bind (address);
}
diff --git a/gr-zeromq/lib/req_source_impl.cc b/gr-zeromq/lib/req_source_impl.cc
index 8dedf6c6af..937b5942c0 100644
--- a/gr-zeromq/lib/req_source_impl.cc
+++ b/gr-zeromq/lib/req_source_impl.cc
@@ -45,6 +45,8 @@ namespace gr {
{
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_REQ);
+ int time = 0;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
d_socket->connect (address);
}