diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-08-11 17:06:49 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-08-25 15:39:20 +0200 |
commit | 76bd6e73c335dbebd8bd30565f83a810058f2cc8 (patch) | |
tree | b3db6f4bbecfe796fb53b4ab968aaf06349817ba /src/session.cpp | |
parent | d13933bc62fce71b5a58118020e0dd3776e79aa9 (diff) |
engine termination on disconnect fixed
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. |