summaryrefslogtreecommitdiff
path: root/src/xsub.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-02-26 08:42:20 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-02-26 08:42:20 +0100
commit67b1f14190186f54fc5954a70f7214411d780aea (patch)
tree776e8abeb6ab35823955d22a6cb5a825e2fecba9 /src/xsub.cpp
parentd4e418f5f48a4d73e0a80a54593d11a6cd86d7bc (diff)
Memory leak in PUB/XPUB sockets fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/xsub.cpp')
-rw-r--r--src/xsub.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/xsub.cpp b/src/xsub.cpp
index 87c8852..5eef191 100644
--- a/src/xsub.cpp
+++ b/src/xsub.cpp
@@ -27,13 +27,12 @@
zmq::xsub_t::xsub_t (class ctx_t *parent_, uint32_t tid_) :
socket_base_t (parent_, tid_),
fq (this),
- dist (this),
has_message (false),
more (false)
{
options.type = ZMQ_XSUB;
options.requires_in = true;
- options.requires_out = true;
+ options.requires_out = false;
zmq_msg_init (&message);
}
@@ -45,15 +44,13 @@ zmq::xsub_t::~xsub_t ()
void zmq::xsub_t::xattach_pipes (class reader_t *inpipe_,
class writer_t *outpipe_, const blob_t &peer_identity_)
{
- zmq_assert (inpipe_ && outpipe_);
+ zmq_assert (inpipe_ && !outpipe_);
fq.attach (inpipe_);
- dist.attach (outpipe_);
}
void zmq::xsub_t::process_term (int linger_)
{
fq.terminate ();
- dist.terminate ();
socket_base_t::process_term (linger_);
}