|
read timeout: msg#00038web.wget.patches
Hi, please find attached a patch to get the --read-timeout option working with connections that hang in a read operation due to the server going offline or changing IP address. When a server goes offline in the middle of an HTTP request, the TCP connection will hang (almost?) indefinitely. Because it isn't closed or rejected but simply doesn't respond to IP packets any more, the select in fd_read will time out normally but then call sock_read which will block forever. There are a couple of scenarios in which this would accour: - the server actually doing down and staying down. After some time a router should start to generate "destination host unreachable" ICMP messages which in turn should reset the HTTP TCP connection but I'm not sure about that. - a firewall is activated on the server which drops all incoming packets. This wouldn't normally happen to a real server but can be used for testing. - a NAT router box inbetween wget and the server loses the connection information. This would be true for most DSL router boxes which get disconnected periodically by the provider, then reconnect and get a different IP. This invalidates all old connections which therefore will hang on the client and server side until they're somehow timed out. I added SO_SNDTIMEO and SO_RCVTIMEO socket options to the socket and put some handling for it into http.c and retr.c. Now I'd like to know if this actually makes any sense or just works around a braindead misunderstanding of mine. ;) I'm not subscribed to this list, so please Cc: to michael@xxxxxxxxxxxxxxxxxxxx -- Thanks, Michael
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Hey buddy, whats up: 00038, Hugo Jeffers |
|---|---|
| Next by Date: | Exchange ISA: 00038, avast |
| Previous by Thread: | Hey buddy, whats upi: 00038, Hugo Jeffers |
| Next by Thread: | Exchange ISA: 00038, avast |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |