Skip to content
Snippets Groups Projects
Unverified Commit 93f85f37 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

pjproject: fix TCP sockets death detection

TCP_KEEPALIVE are not enough to detect that TCP connections are dead or not.
Some routers doesn't seems to support TCP_KEEPALIVE and moreover, sometimes
the settings is just not enough as described in this article:
https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/

RFC 5482 describe a new option for sockets: TCP_USER_TIMEOUT which must be used
with keep alives to detect closed connection in a better way.

In this patch we set TCP_USER_TIMEOUT to 30 seconds (like the keep alive). This is
a TCP level socket option used to specify the max time in ms that transmitted data
can be unacknowledged before a force close.

Change-Id: I217616b9b9e08adfa5a044a451fbbc97faf1939e
Gitlab: #243
parent 8473608f
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment