fix memory leak: close zmq messages