zeromq/czmq — pull request #244 by ulikoehler (2013-09-27 15:00:30+00:00)
Title: Ensure zctx_destroy ignores NULL zockets, instead of asserting

My application can be canceled using Ctrl+C / SIGINT, but in about 20% of the cases the following assertion fails:
```
zctx.c:295: zctx__socket_destroy: Assertion `zocket' failed.
```
The fails seem to be random. Most sockets should destroyed before *zctx_destroy()* is called.

I think *zctx_destroy()* should never fail an assertion. I'm not sure why *NULL* zockets are inserted into the *zctx* socket list, but this PR at least fixes the symptom of a failing assertion and just skips *NULL* sockets.