Skip to content

Commit fadb37e

Browse files
committed
Merge pull request #52 from revaultch/master
Fixes assertion error: src/mutex.hpp:123
2 parents 4d79066 + 971092e commit fadb37e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

zmq.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,16 +372,14 @@ namespace zmq
372372

373373
inline ~context_t () ZMQ_NOTHROW
374374
{
375-
close();
375+
int rc = zmq_ctx_destroy (ptr);
376+
ZMQ_ASSERT (rc == 0);
376377
}
377378

378379
inline void close() ZMQ_NOTHROW
379380
{
380-
if (ptr == NULL)
381-
return;
382-
int rc = zmq_ctx_destroy (ptr);
381+
int rc = zmq_ctx_shutdown (ptr);
383382
ZMQ_ASSERT (rc == 0);
384-
ptr = NULL;
385383
}
386384

387385
// Be careful with this, it's probably only useful for

0 commit comments

Comments
 (0)