louiscad
07/07/2020, 6:56 AMokhttp3.internal.http2.StreamResetException: stream was reset: CANCEL
unless I add logging with BODY
level:
.addInterceptor(HttpLoggingInterceptor(logger = HttpLoggingInterceptor.Logger.DEFAULT)
.setLevel(HttpLoggingInterceptor.Level.BODY))
Whenever I disable body logging, I get the cryptic exception aforementioned, and I don't get why.
Where should I look for?
I can commit and push my work for reproducing if needed since its open source.gildor
07/07/2020, 7:03 AMlouiscad
07/07/2020, 7:13 AMlouiscad
07/07/2020, 7:24 AMexecute()
in place of my await
extension (which most likely looks like yours that is on GitHub), I get no issue!louiscad
07/07/2020, 7:28 AM<http://Dispatchers.IO|Dispatchers.IO> { call.execute() }
for now, even though I means giving up on cancellation…louiscad
07/07/2020, 7:38 AMfinally
block with a catch
block where I rethrow after cancelling the `Call`:
catch (t: Throwable) {
cancel()
throw t
}
jw
07/07/2020, 12:35 PMlouiscad
07/07/2020, 1:08 PMCancellableContinuation
or the Job
. Or would it work when its call is wrapped with runInterruptible { }
?jw
07/07/2020, 1:26 PMlouiscad
07/07/2020, 1:33 PMcancel()
function.
Anyway, I fixed my await
extension by not calling cancel
in all cases (what happened when it was in the finally
block) (and I feel silly now).