diff options
author | Kazuki Yamaguchi <[email protected]> | 2021-04-29 20:42:33 +0900 |
---|---|---|
committer | git <[email protected]> | 2021-11-04 20:44:04 +0900 |
commit | 5f2c4e344dc2f19aab54523ae418800b08adaa61 (patch) | |
tree | 323f240b0e09ff0479ae3fec256d98bd801e621b /lib/net | |
parent | a53aab1273729c10b7e675ce8fd1a711d22c0cd0 (diff) |
[ruby/net-http] Reset keep_alive timer on new connection
The last_communicated timestamp is for HTTP persistent connection, to
decide whether the current TCP connection may be reused for the
subsequent requests or not. Naturally, the timer must be reset if the
connection is recreated since it is no longer relevant.
https://github.com/ruby/net-http/commit/0a013de42d
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/http.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index aaf3e3104d..552f818e5d 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1055,6 +1055,7 @@ module Net #:nodoc: write_timeout: @write_timeout, continue_timeout: @continue_timeout, debug_output: @debug_output) + @last_communicated = nil on_connect rescue => exception if s |