fix server.stop should stop heartbeat before close the log