Skip to content
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,23 @@ public void writeTo(BufferedSink bufferedSink) throws IOException {
}
}, 1, 1).then();

// The blocking happens on OkHttp thread pool.
if (callTimeoutMillis > 0) {
/*
* Default call timeout (in milliseconds). By default there is no timeout for complete calls, but
* there is for the connection, write, and read actions within a call.
*/
requestSendMono.block(Duration.ofMillis(callTimeoutMillis));
} else {
requestSendMono.block();
try {
// The blocking happens on OkHttp thread pool.
if (callTimeoutMillis > 0) {
/*
* Default call timeout (in milliseconds). By default there is no timeout for complete calls, but
* there is for the connection, write, and read actions within a call.
*/
requestSendMono.block(Duration.ofMillis(callTimeoutMillis));
} else {
requestSendMono.block();
}
} catch (RuntimeException e) {
if (e.getCause() instanceof IOException) {
throw (IOException) e.getCause();
} else {
throw e;
}
}
} else {
// Prevent OkHttp from potentially re-sending non-repeatable body outside of retry policies.
Expand Down
Loading