mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-18 17:36:57 +00:00
Backported fix for #1399
Problem: asserts if EINVAL recieved on read/write This causes assertion failures after network reconnects. Solution: allow EINVAL as a possible condition after read/write. Fixes #829 Fixes #1399 Patch provided by Michele Dionisio @mdionisio, thanks :)
This commit is contained in:
parent
e3e699190f
commit
a73740b304
@ -192,7 +192,6 @@ int zmq::tcp_write (fd_t s_, const void *data_, size_t size_)
|
|||||||
&& errno != EBADF
|
&& errno != EBADF
|
||||||
&& errno != EDESTADDRREQ
|
&& errno != EDESTADDRREQ
|
||||||
&& errno != EFAULT
|
&& errno != EFAULT
|
||||||
&& errno != EINVAL
|
|
||||||
&& errno != EISCONN
|
&& errno != EISCONN
|
||||||
&& errno != EMSGSIZE
|
&& errno != EMSGSIZE
|
||||||
&& errno != ENOMEM
|
&& errno != ENOMEM
|
||||||
@ -241,7 +240,6 @@ int zmq::tcp_read (fd_t s_, void *data_, size_t size_)
|
|||||||
if (rc == -1) {
|
if (rc == -1) {
|
||||||
errno_assert (errno != EBADF
|
errno_assert (errno != EBADF
|
||||||
&& errno != EFAULT
|
&& errno != EFAULT
|
||||||
&& errno != EINVAL
|
|
||||||
&& errno != ENOMEM
|
&& errno != ENOMEM
|
||||||
&& errno != ENOTSOCK);
|
&& errno != ENOTSOCK);
|
||||||
if (errno == EWOULDBLOCK || errno == EINTR)
|
if (errno == EWOULDBLOCK || errno == EINTR)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user