Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[6-stable] Add TCP keepalive in Twitter::Streaming::Connection (#856)
* Add TCP keepalive in Twitter::Streaming::Connection Without correct TCP keepalive setup, the Twitter streaming client is prone to hang on long-lived connections. This is due to the nature of the protocol: a single request is made, then the client simply waits for data to read on a socket. Without keepalive, it may be indistinguishable to the client whether the connection has failed or there is simply no data to read. These changes add the ability to set TCP keepalive providing the OS supports it. They also provide a set of sensible defaults to the keepalive for this implementation, while disabled by default. * Add tests around keepalive setup
- Loading branch information
1 parent
a83d6e0
commit d9cde55
Showing
2 changed files
with
96 additions
and
2 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