This patch adds a user configurable option to set the TCP_USER_TIMEOUT socket option. With this timeout set a broken TCP session is shutdown after a given timeout even there are unacked packets. SO_KEEPALIVE seems not to work in this case.