summaryrefslogtreecommitdiff
path: root/src/owned.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-08-21 14:29:22 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-08-21 14:29:22 +0200
commit6be4b0143793ab5ceebc5d9d6bbe5c2f1333a0d2 (patch)
treea785065e54317d1d360e2e4b3a4acf1d6e5669f1 /src/owned.cpp
parenta801b6d8b37557ccfb53030dca22f89a3f99b59c (diff)
session management implemented
Diffstat (limited to 'src/owned.cpp')
-rw-r--r--src/owned.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/owned.cpp b/src/owned.cpp
index 6995a39..810bed7 100644
--- a/src/owned.cpp
+++ b/src/owned.cpp
@@ -47,6 +47,14 @@ void zmq::owned_t::process_plug ()
finalise_command ();
}
+void zmq::owned_t::process_attach (zmq_engine_t *engine_)
+{
+ // Keep track of how many commands were processed so far.
+ processed_seqnum++;
+
+ finalise_command ();
+}
+
void zmq::owned_t::term ()
{
send_term_req (owner, this);
@@ -65,8 +73,8 @@ void zmq::owned_t::finalise_command ()
// If termination request was already received and there are no more
// commands to wait for, terminate the object.
if (shutting_down && processed_seqnum == sent_seqnum.get ()) {
- send_term_ack (owner);
process_unplug ();
+ send_term_ack (owner);
delete this;
}
}