fix handler.Input should be locked when session.Closed