workaround the race condition in ZMQ