fix close acceptor and connection before start