fix the libevent cannot exit bug.