Transport: closing transport before sending stop event caused SSL errors when stopping the session.