[zeromq-dev] Static zmq context in Windows DLL

Attila Magyari atti86 at gmail.com
Mon Dec 9 14:14:21 CET 2019


Hello,

I've encountered this issue: https://github.com/zeromq/czmq/issues/1788
Basically when exiting the application, I get this error: *Assertion
failed: Successful WSASTARTUP not yet performed.*

I am using ZeroMQ on windows inside a DLL. I have a global static zeromq
context, because I want it persistent across multiple instances of my
objects, and there is no central place I could pass it from otherwise.

The proposed solution is to call zsys_shutdown() before exiting the
application, but I don't know how and where:

   - This function is not available through the API that I am using
   (zmq.h/zmq.hpp)
   - Not sure where would I call it, as I don't know when the application
   exits. In my library there is no main object that could control the
   lifetime of the zmq layer

Any idea how to approach this?

Kinds regards,
Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20191209/dfab7c52/attachment.htm>


More information about the zeromq-dev mailing list