[Pythonmac-SIG] Lost connection

Bob Ippolito bob@redivi.com
Sun, 28 Apr 2002 20:35:52 -0400


On Sunday, April 28, 2002, at 08:23 PM, Broznews wrote:
*snip*
> So, why don't I just kill the connection when I stop seeing data? When 
> this
> goes into production, I can't kill the connection. It's bad form. The 
> nature
> of the process is that the sending machine will VERY LIKELY stop sending
> data for hours at a time, and then fire up again. I cannot control that
> machine, and it is a requirement that I never break the connection. 
> It's a
> 24x7 feed. It works at other sites.
*snip*

Easy solution:  send packets every so often as a "keep-alive ping".  
Don't trust anything that you don't hear from for a few hours.
Bad form is if the protocol is designed such that it can't send "empty 
data" to test the connection (on either end, doesn't matter really).

-bob