mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-31 01:43:02 +08:00
Simplified error handling for make_fdpair on Windows
This commit is contained in:
parent
c573f6b812
commit
2be70dca1a
@ -422,16 +422,9 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
|
||||
// Cleanup writer if connection failed
|
||||
rc = closesocket (*w_);
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
|
||||
*w_ = INVALID_SOCKET;
|
||||
|
||||
// Set errno from saved value
|
||||
errno = wsa_error_to_errno (conn_errno);
|
||||
|
||||
// Ideally, we would return errno to the caller signaler_t()
|
||||
// Unfortunately, it uses errno_assert() which gives "Unknown error"
|
||||
// We might as well assert here and print the actual error message
|
||||
wsa_assert_no (conn_errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user