http_file: use lower keepalive times under Linux
commit0bbbd8cfa2df665bc22a47831adf91668e391e3e
authorEric Wong <normalperson@yhbt.net>
Wed, 7 Dec 2011 02:03:05 +0000 (7 02:03 +0000)
committerEric Wong <normalperson@yhbt.net>
Wed, 7 Dec 2011 02:29:23 +0000 (7 02:29 +0000)
tree08b1c1e8cfabaca403ae34bc2b68e4d8510d0610
parentda58f47f541cff65e814a614ecff722ba2a35bf8
http_file: use lower keepalive times under Linux

TCP keepalives are inexpensive, so we can use them to monitor
whether or not our connection is still alive while uploading.

Remote servers make take an unpredictable amount of time to
actually write out the data we've uploaded (and empty socket
buffers to receive more), so it is extremely difficult to
calculate an effective timeout for select() or poll().
lib/mogilefs/http_file.rb