How to avoid socket timeout

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Jan 24 18:08:44 EST 2002


"Matthew" <miracle at paradise.net.nz> writes:

> I think theres something in the windows registry, and also in the
> API. It's called Time To Live (TTL) this won't help much with time
> out but it'll reduce the chances of it happening.

It won't help at all.TTL is not a time, but the number of hops each
packet can traverse before it is discarded.

> Each time a packet passes through a router, it's TTL (Time to Live) is
> decremented, if there's a blockage or bad routes, the packet might have to
> take an extra long route to get to the other computer. If you increase the
> TTL, this will stop timeout's in this situation.

The problem is not that the packet is dropped, but that the dial-up
connection does not come up quickly enough.

> Also sometimes timeouts are caused by [cable] modems dialling, or sleeping
> equipment waking up. To avoid this, just eat the first couple of exceptions
> and try again ;)

That is probably the most sensible thing to do.

Regards,
Martin



More information about the Python-list mailing list