-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent the tcp sink from blocking (#79)
Prevent tcpStatsdSink.Flush() from hanging when there is nothing to flush and add test to replicate Flush() deadlock. * tcp sink: ensure Flush() exits Previosly, continuous writes could prevent calls to Flush() from exiting. This commit changes Flush() to only flush buffers that are pending at the time Flush() is called. * tcp sink: Add connect and write timeouts This will prevent establishing or writing to a net.Conn from hanging the program.
- Loading branch information
Charlie Vieth
authored
Jun 20, 2019
1 parent
9b96f33
commit 0943cd5
Showing
2 changed files
with
173 additions
and
44 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
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