summaryrefslogtreecommitdiffstats
path: root/src/odr-audioenc.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-10-11 15:51:38 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-10-11 15:51:38 +0200
commit3d0534fa8bfaa7458e39e0c12255e341bd58b1c5 (patch)
tree3e59c7c6bfbfe779bd7410525c64721c4e2e7cce /src/odr-audioenc.cpp
parent7f9c0a810b6028680d14a9b479a61b37ffa10f83 (diff)
downloadODR-AudioEnc-3d0534fa8bfaa7458e39e0c12255e341bd58b1c5.tar.gz
ODR-AudioEnc-3d0534fa8bfaa7458e39e0c12255e341bd58b1c5.tar.bz2
ODR-AudioEnc-3d0534fa8bfaa7458e39e0c12255e341bd58b1c5.zip
Set zmq socket linger to avoid lockup at teardown
Diffstat (limited to 'src/odr-audioenc.cpp')
-rw-r--r--src/odr-audioenc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index 3b42dfd..9f88a4b 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -764,6 +764,10 @@ int main(int argc, char *argv[])
zmq::context_t zmq_ctx;
zmq::socket_t zmq_sock(zmq_ctx, ZMQ_PUB);
+ // Do not wait at teardown to send all data out
+ int linger = 0;
+ zmq_sock.setsockopt(ZMQ_LINGER, &linger, sizeof(linger));
+
if (not output_uris.empty()) {
for (auto uri : output_uris) {
if (uri == "-") {