se-bastiaan/TorrentStream-Android

TorrentStream.pauseSession() does not pause session while downloading.

masterwok opened this issue · 2 comments

Hi,

I am using this library, and I'm seeing torrent sessions failing to pause.

Is this line supposed to be isStreaming instead of NOT isStreaming? With the current guard, wouldn't the session only be paused when not streaming?

https://github.com/TorrentStream/TorrentStream-Android/blob/26ef6b3a001282768d9aba918e8d58898c0a20da/library/src/main/java/com/github/se_bastiaan/torrentstream/TorrentStream.java#L170

Thank you!

It's supposed to block you from pausing the libtorrent session while a stream is running. You should stop the stream before you can pause the session.

Oh, okay. I was thinking it would be faster to pause and resume the session rather than starting/stopping a stream in the case that the user was resuming the same paused stream. Thanks!