Closed sayap closed 4 years ago
Previously, when keep_alive_timeout <= idle_timeout, and a request arrives after exceeding idle_timeout, the following will be called:
As connect is called twice, a perfectly good connection is wasted.
Commit 1dcdf06f fixed the case when a request arrives before exceeding idle_timeout, but the above edge case remains.
Fix it by resetting the "last_communicated" value back to nil after calling Net::HTTP#finish.
Previously, when keep_alive_timeout <= idle_timeout, and a request arrives after exceeding idle_timeout, the following will be called:
As connect is called twice, a perfectly good connection is wasted.
Commit 1dcdf06f fixed the case when a request arrives before exceeding idle_timeout, but the above edge case remains.
Fix it by resetting the "last_communicated" value back to nil after calling Net::HTTP#finish.