SSH2: Defer to default socket timeout in absence of more specific value #2023
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempting to address #2020, this issue formalizes the implied behavior prior to #1999 regarding PHP stream timeouts, by defaulting to PHP's
default_socket_timeout
for stream read functions when the user has not requested a timeout or keep-alive interval. This change mirrors the default timeout behavior of PHP socket streams, as evidenced here, and thus the behavior prior to #1999 changes, whenstream_set_timeout
was conditionally invoked. It is noteworthy that the prior implementation would not permit an update to remove a timeout viaSSH2:setTimeout
, given the conditional invocation ofstream_set_timeout
, now supported.The following simple test confirms the underlying use of the default socket timeout when
stream_set_timeout
is never invoked, as execution terminates after 10 seconds, as defined.