We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When http request is failed, java.io.RandomAccessFile is not closed.
https://github.com/dispatch/reboot/blob/master/core/src/main/scala/as/core.scala#L35
The text was updated successfully, but these errors were encountered:
Is there any workaround?
Sorry, something went wrong.
@Sciss I wrote alternative implementation.
object AsFile { def apply(file: java.io.File) = { val tFile = new java.io.RandomAccessFile(file, "rw") (new client.resumable.ResumableAsyncHandler with OkHandler[Nothing] { override def onThrowable(t: Throwable): Unit = { super.onThrowable(t) try tFile.close() catch { case e: Throwable => } } }).setResumableListener( new client.extra.ResumableRandomAccessFileListener( tFile ) ) } }
Thanks - I'm also having a custom AsFile-like thing now (https://gist.github.com/Sciss/bea9022d90a4f0ad7556e8fa283ff459) as I want to monitor download progress, so adding that onThrowable is straight forward.
onThrowable
Successfully merging a pull request may close this issue.
When http request is failed, java.io.RandomAccessFile is not closed.
https://github.com/dispatch/reboot/blob/master/core/src/main/scala/as/core.scala#L35
The text was updated successfully, but these errors were encountered: