
Clearing the session_started_event before sending </stream> will pause the send loop so that we don't continue sending data after the </stream>.
Clearing the session_started_event before sending </stream> will pause the send loop so that we don't continue sending data after the </stream>.