-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shared client: Do not busy loop on errors
Change the receive loop to wait for a trigger from the send loop to restart receiving after errors have been received. On any error all the current requests are canceled, so there is no point receiving before a new request is sent. This prevents receiver busy-looping on sticky error conditions, such as i/o timeout. Also consider io.EOF as a connection close, as the TLS/TCP connections are read through the io package, which returns io.EOF on graceful connection close. Explicitly wait for the write timeout when sending a new request to the handler, as the handler may be quitting at the same time and never actually handle the new request. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
- Loading branch information
1 parent
eaf71f6
commit 50ce2af
Showing
1 changed file
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters