Don't set transfer TCS exception if disconnect exception is null#939
Don't set transfer TCS exception if disconnect exception is null#939jpdillingham wants to merge 1 commit into
Conversation
|
On second thought, after looking at the unit tests that would cover this, I don't think it makes sense. There's this logic: var firstTask = await Task.WhenAny(
readTask, // we successfully read all of the data
disconnectedTaskCancellationSource.Task, // the connection is disconnected
download.RemoteTaskCompletionSource.Task).ConfigureAwait(false);This sets up a race condition between:
If the connection disconnects before either of the other two tasks, the transfer has failed, and we need the We deliberately disconnect the connection with As far as I can tell, the thing to do here is nothing; everything is already working as intended. |
I don't recall why I created this branch, but these changes seem to make sense so I'm going to merge it.