Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,15 @@ public Builder setSocketTimeout(final int soTimeout, final TimeUnit timeUnit) {
}

/**
* Determines the default socket timeout value for I/O operations.
* Determines the default socket timeout value for I/O operations on
* connections created by this configuration.
* A timeout value of zero is interpreted as an infinite timeout.
* <p>
* This value acts as a baseline configured by the I/O layer. It can be
Copy link
Member

@ok2c ok2c Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LichKing-lee Actually this is not quite correct. The baseline is established by the respective i/o layer (through SocketConfig for the classic one or IOReactorConfig for the async one). Those settings apply to all newly created connections / channels indiscriminately. ConnectionConfig is one layer up and can apply selectively to specific hosts. This is reason ConnectionConfig exists, so one could configure different connection settings for specific hosts only.

* overridden by settings applied at the connection layer, and in turn may be
* overridden by parameters applied at the protocol layer for the duration of
* a message execution.
* </p>
* <p>
* Default: {@code null} (undefined)
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,13 @@ public Builder setConnectTimeout(final long connectTimeout, final TimeUnit timeU
* configured appropriately.
* </p>
* <p>
* This parameter may override a socket timeout configured at the connection
* or I/O layers for the duration of a message execution. It is not a hard
Copy link
Member

@ok2c ok2c Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LichKing-lee Not quite. It does not apply to the entire duration of a message exchange. It defines the maximum period of inactivity between sending of a request message and receipt of a response message head. Once a response head has been received the connection socket timeout gets reset back to its previous value and the content of the response message gets consumed with the socket timeout configured at the connection or i/o layers.

* deadline; its effective duration can be exceeded, for example, by automatic
* request re-execution policies. Ensure such policies are configured
* appropriately.
* </p>
* <p>
* Default: {@code null}
* </p>
*
Expand Down
Loading