Had the same issue; it's not a bug, use one or the other, not both, but use the ZContext
methods, they're more efficient.
close()
explicitly closes the socket, so calling ctx.destroySocket()
afterwards throws that exception. If you need to close the socket, use ctx.destroySocket()
, don't use close()
at all, and always use ctx.destroy()
to close the context before shutting down and exiting gracefully, it will automatically close any sockets created from that context.