Add retry of zmq_ctx_destroy in context_t::close()

Fixes #171
This commit is contained in:
E. G. Patrick Bos 2018-11-05 20:09:28 +01:00
parent c444c5d5e2
commit fbe82b07cd
No known key found for this signature in database
GPG Key ID: FA542D0D9030B1AB

View File

@ -522,7 +522,11 @@ class context_t
if (ptr == NULL)
return;
int rc = zmq_ctx_destroy(ptr);
int rc;
do {
rc = zmq_ctx_destroy(ptr);
} while (rc == -1 && errno == EINTR);
ZMQ_ASSERT(rc == 0);
ptr = NULL;
}