mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 08:46:44 +01:00
Issue 1588 : Rollback in case send fails for multipart msg
This commit is contained in:
parent
cca67fdd1b
commit
8ec747e14a
12
src/lb.cpp
12
src/lb.cpp
@ -107,7 +107,17 @@ int zmq::lb_t::sendpipe (msg_t *msg_, pipe_t **pipe_)
|
||||
break;
|
||||
}
|
||||
|
||||
zmq_assert (!more);
|
||||
// If send fails for multi-part msg rollback other
|
||||
// parts sent earlier and return EAGAIN.
|
||||
// Application should handle this as suitable
|
||||
if (more)
|
||||
{
|
||||
pipes [current]->rollback ();
|
||||
more = 0;
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
active--;
|
||||
if (current < active)
|
||||
pipes.swap (current, active);
|
||||
|
Loading…
x
Reference in New Issue
Block a user