diff options
Diffstat (limited to 'src/session.cpp')
-rw-r--r-- | src/session.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/session.cpp b/src/session.cpp index 0494ff1..e208ebf 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -49,8 +49,10 @@ zmq::session_t::~session_t () void zmq::session_t::terminate () { - // TODO: - zmq_assert (false); + if (in_pipe) + in_pipe->terminate (); + if (out_pipe) + out_pipe->terminate (); } bool zmq::session_t::read (::zmq_msg_t *msg_) @@ -228,6 +230,14 @@ void zmq::session_t::process_attach (i_engine *engine_, attached (peer_identity_); } +void zmq::session_t::detach () +{ + // Engine is dead. Let's forget about it. + engine = NULL; + + detached (); +} + void zmq::session_t::process_term () { // Here we are pugging into the own_t's termination mechanism. |