Solution: - call zmq_msg_close() if there is an error - call free() to release resources if there is an error (CWE-404)
Solution: use msleep (SETTLE_TIME) everywhere when waiting for the connections/sockets to be settled instead of a variety of patterns and functions to make tests more coherent.