You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to stream a file (torrentManagerFile1) using this piece of code : await torrentManager.StreamProvider.CreateStreamAsync(torrentManagerFile1, true, cancellationToken);
I cancel the Task before ActiveStream is returned from CreateStreamAsync().
Then if I try to stream another file (torrentManagerFile2) from same torrent calling: await torrentManager.StreamProvider.CreateStreamAsync(torrentManagerFile2, true, cancellationToken);
The following error is thrown InvalidOperationException ("You must Dispose the previous stream before creating a new one.")
Looking at the code of StreamProvider.CreateStreamAsync() it seems that if the task is canceled the ActiveStream still has the Disposed property to false, so this is why the issue occurs.