Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fritz keepalive #18155
Adds TCP keepalive support to fritzbox call monitor. This is needed, if the FRITZ!Box is queried through a firewall with NAT, since the firewall forgets about
Related issue (if applicable): None
Example entry for
As to the why: When searching the web for that functionality, I just saw someone recommending "If you are nice to your users, implement it as an option": https://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#codeneeding . I figured, I'd be nice to our users and add the option with no harm.
As to the pain: There might be a good reason, why keepalive is disabled in Python sockets by default. A few disadvantages of keepalive are listed here: http://www.pcvr.nl/tcpip/tcp_keep.htm. Hoever, I guess the only relevant one for us would be "(1) they can cause perfectly good connections to be dropped during transient failures". In our case, we might have the home assistant sitting on an unreliable network. I don't know, what happens, if the connection to the fritzbox is constantly restarted becuase of the failing keepalives.
Summary: I find the option does no harm. But no hard feelings. If you all think different, I'll just make keepalive the default behavior. Please request a change then...
Nov 6, 2018
I see. So in summary and ideally and in that order:
I'll keeep that in mind for future work. Thanks.