Closes the Gateway and ends the current session, suspending until the underlying webSocket is closed.