Skip to content
New issue

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

okhttp: Ignore known conscrypt socket close issue (1.61.x backport) #10812

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@
}

@Override
@SuppressWarnings("Finally")
public void run() {
String threadName = Thread.currentThread().getName();
Thread.currentThread().setName("OkHttpClientTransport");
Expand Down Expand Up @@ -1130,6 +1131,15 @@
frameReader.close();
} catch (IOException ex) {
log.log(Level.INFO, "Exception closing frame reader", ex);
} catch (RuntimeException e) {

Check warning on line 1134 in okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java

View check run for this annotation

Codecov / codecov/patch

okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java#L1134

Added line #L1134 was not covered by tests
// This same check is done in okhttp proper:
// https://github.com/square/okhttp/blob/3cc0f4917cbda03cb31617f8ead1e0aeb19de2fb/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt#L270

// Conscrypt in Android 10 and 11 may throw closing an SSLSocket. This is safe to ignore.
// https://issuetracker.google.com/issues/177450597
if (!"bio == null".equals(e.getMessage())) {
throw e;

Check warning on line 1141 in okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java

View check run for this annotation

Codecov / codecov/patch

okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java#L1141

Added line #L1141 was not covered by tests
}
}
listener.transportTerminated();
Thread.currentThread().setName(threadName);
Expand Down