Merge pull request #275 from egpbos/retry_ctx_destroy

Add retry of zmq_ctx_destroy in context_t::close()
This commit is contained in:
Simon Giesecke 2018-11-08 11:20:33 +01:00 committed by GitHub
commit d641d1de4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}