summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zmq.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zmq.cpp b/src/zmq.cpp
index b533d23..399a426 100644
--- a/src/zmq.cpp
+++ b/src/zmq.cpp
@@ -384,6 +384,10 @@ int zmq_recv (void *s_, void *buf_, size_t len_, int flags_)
// TODO: Build in a notification mechanism to report the overflows.
size_t to_copy = size_t (rc) < len_ ? size_t (rc) : len_;
memcpy (buf_, zmq_msg_data (&msg), to_copy);
+
+ rc = zmq_msg_close (&msg);
+ errno_assert (rc == 0);
+
return (int) to_copy;
}