fixed hang at exit when using jeromq