diff options
author | malosek <malosek@fastmq.com> | 2009-09-16 14:26:04 +0200 |
---|---|---|
committer | malosek <malosek@fastmq.com> | 2009-09-16 14:26:04 +0200 |
commit | 3534732c0614a764731fbea2431247068fa63330 (patch) | |
tree | 411b0a7b0fea4f9da2bb4318b42ab60f50715474 /src/session.cpp | |
parent | 17800ac85e667d18124d0e90f9387d6c90887570 (diff) | |
parent | a71d00288008b7ed1dc91b6ad3d5fdf25a5e683e (diff) |
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'src/session.cpp')
-rw-r--r-- | src/session.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp index 9593827..d455462 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -55,6 +55,9 @@ bool zmq::session_t::read (::zmq_msg_t *msg_) bool zmq::session_t::write (::zmq_msg_t *msg_) { + if (!out_pipe) + return true; + if (out_pipe->write (msg_)) { zmq_msg_init (msg_); return true; @@ -65,7 +68,8 @@ bool zmq::session_t::write (::zmq_msg_t *msg_) void zmq::session_t::flush () { - out_pipe->flush (); + if (out_pipe) + out_pipe->flush (); } void zmq::session_t::detach () |