fix When an exception is thrown,the executor is not properly stopped.