-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agent): add timeout on write calls
When sending a message via agent, the write connection does not have a default timeout, leading to blocking calls if the connections is unhealthy or simply a bad route to it. Thus, adding a write timeout to the writes so we fail but don't block. If deadline is exceeded then we log an error but don't close a connection, since it might fail due to bad route but not a broken pipe per-se. The new configuration can be found under: `pitaya.buffer.agent.writetimeout`, with 10s by deafult. The timeout is set using `SetWriteDeadline` function from go net pkg: https://pkg.go.dev/net#Conn
- Loading branch information
Showing
5 changed files
with
136 additions
and
49 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
Oops, something went wrong.