Fixed a bug where the streaming failed exception was set on the upload session even if the upload
was already terminated and therefore the session is null.