summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2010-01-21 09:58:49 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2010-01-21 09:58:49 +0100
commitf0757c003eb232247a460631276b40e4fc02f3c9 (patch)
tree82ebb60ea563af64bd0c003c4c5b69d0f5358361 /src
parent6a46ca75e5970733cfe135ecf77074b69fdda34f (diff)
ZMQII-43: Race condition when writing to pipe
Diffstat (limited to 'src')
-rw-r--r--src/session.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 5b5fcb3..1aece4d 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -78,7 +78,7 @@ bool zmq::session_t::read (::zmq_msg_t *msg_)
bool zmq::session_t::write (::zmq_msg_t *msg_)
{
- if (out_pipe->write (msg_)) {
+ if (out_pipe && out_pipe->write (msg_)) {
zmq_msg_init (msg_);
return true;
}