Skip to content

Commit

Permalink
Silently ignore 'bio == null' NullPointerExceptions (#6533)
Browse files Browse the repository at this point in the history
Closes: #6509
  • Loading branch information
swankjesse authored Jan 30, 2021
1 parent 04e9af2 commit db229c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions okhttp/src/main/kotlin/okhttp3/internal/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ fun Socket.closeQuietly() {
} catch (e: AssertionError) {
throw e
} catch (rethrown: RuntimeException) {
if (rethrown.message == "bio == null") {
// Conscrypt in Android 10 and 11 may throw closing an SSLSocket. This is safe to ignore.
// https://issuetracker.google.com/issues/177450597
return
}
throw rethrown
} catch (_: Exception) {
}
Expand Down

0 comments on commit db229c8

Please sign in to comment.