Skip to content

Commit 7e45011

Browse files
authored
Update sentry-okhttp/src/main/java/io/sentry/okhttp/SentryOkHttpInterceptor.kt
1 parent 1a1ea1b commit 7e45011

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sentry-okhttp/src/main/java/io/sentry/okhttp/SentryOkHttpInterceptor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ public open class SentryOkHttpInterceptor(
192192

193193
private fun finishSpan(span: ISpan?, request: Request, response: Response?, isFromEventListener: Boolean, okHttpEvent: SentryOkHttpEvent?) {
194194
if (span == null) {
195+
// tracing can be disabled, or there can be no active span, but we still want to finalize the OkHttpEvent when both SentryOkHttpInterceptor and SentryOkHttpEventListener are used
195196
okHttpEvent?.finish()
196197
return
197198
}

0 commit comments

Comments
 (0)