From dce17292e1f62ca692aa36ed3eaf5bfb09e7ab69 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 21 Apr 2012 19:36:35 +0200 Subject: 'own' command replaced by synchronous call The commands was a vestige of the removed 'durable sockets' feature Signed-off-by: Martin Sustrik --- src/own.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/own.cpp') diff --git a/src/own.cpp b/src/own.cpp index 968d272..45f1cbf 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -76,8 +76,16 @@ void xs::own_t::launch_child (own_t *object_) // Plug the object into the I/O thread. send_plug (object_); - // Take ownership of the object. - send_own (this, object_); + // If the object is already being shut down, new owned objects are + // immediately asked to terminate. Note that linger is set to zero. + if (terminating) { + register_term_acks (1); + send_term (object_, 0); + return; + } + + // Store the reference to the owned object. + owned.insert (object_); } void xs::own_t::process_term_req (own_t *object_) @@ -103,20 +111,6 @@ void xs::own_t::process_term_req (own_t *object_) send_term (object_, options.linger); } -void xs::own_t::process_own (own_t *object_) -{ - // If the object is already being shut down, new owned objects are - // immediately asked to terminate. Note that linger is set to zero. - if (terminating) { - register_term_acks (1); - send_term (object_, 0); - return; - } - - // Store the reference to the owned object. - owned.insert (object_); -} - void xs::own_t::terminate () { // If termination is already underway, there's no point -- cgit v1.2.3