mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-31 01:43:02 +08:00
Problem: kFreeBSD might return ECONNRESET under load when destroying engine
Solution: ignore it on kFreeBSD, as it is not an error Thanks Steven Chamberlain <steven@pyro.eu.org> for the patch!
This commit is contained in:
parent
6585aeaba2
commit
361e99a906
@ -156,6 +156,12 @@ zmq::stream_engine_t::~stream_engine_t ()
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
#else
|
||||
int rc = close (s);
|
||||
#ifdef __FreeBSD_kernel__
|
||||
// FreeBSD may return ECONNRESET on close() under load but this is not
|
||||
// an error.
|
||||
if (rc == -1 && errno == ECONNRESET)
|
||||
rc = 0;
|
||||
#endif
|
||||
errno_assert (rc == 0);
|
||||
#endif
|
||||
s = retired_fd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user