mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 02:42:58 +01:00
Merge pull request #1341 from hintjens/master
Problem: issue #1144, 1377
This commit is contained in:
commit
88ac63189c
@ -132,11 +132,14 @@ zmq::signaler_t::~signaler_t ()
|
||||
const struct linger so_linger = { 1, 0 };
|
||||
int rc = setsockopt (w, SOL_SOCKET, SO_LINGER,
|
||||
(const char *) &so_linger, sizeof so_linger);
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
rc = closesocket (w);
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
rc = closesocket (r);
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
// Only check shutdown if WSASTARTUP was previously done
|
||||
if (rc == 0 || WSAGetLastError () != WSANOTINITIALISED) {
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
rc = closesocket (w);
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
rc = closesocket (r);
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
}
|
||||
#else
|
||||
int rc = close_wait_ms (w);
|
||||
errno_assert (rc == 0);
|
||||
|
@ -94,11 +94,10 @@ int main(int, char**) {
|
||||
}
|
||||
if (iteration == 1) {
|
||||
zmq_connect(subSocket, "inproc://someInProcDescriptor") && printf("zmq_connect: %s\n", zmq_strerror(errno));
|
||||
//zmq_connect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_connect: %s\n", zmq_strerror(errno));
|
||||
msleep (SETTLE_TIME);
|
||||
}
|
||||
if (iteration == 4) {
|
||||
zmq_disconnect(subSocket, "inproc://someInProcDescriptor") && printf("zmq_disconnect(%d): %s\n", errno, zmq_strerror(errno));
|
||||
//zmq_disconnect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_disconnect: %s\n", zmq_strerror(errno));
|
||||
}
|
||||
if (iteration > 4 && rc == 0)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user