backend: respect timeout on socket/timeout errors
commit53e87bef5bfebe76a8724375902b7c1cfe1636d4
authorEric Wong <normalperson@yhbt.net>
Sat, 28 Jul 2012 01:45:03 +0000 (27 18:45 -0700)
committerEric Wong <normalperson@yhbt.net>
Thu, 2 Aug 2012 00:14:03 +0000 (1 17:14 -0700)
tree8f8b94b3881f54f3c94ad1bfbd49a7a4f01d69ef
parentcf12eec6c36ac926630037bd08428e1987a7231c
backend: respect timeout on socket/timeout errors

While retrying idempotent requests (even on timeouts) would
prevent stale sockets from being noticed, it is better to kill
the socket and immediately propagate the timeout error to the
user.  Retrying in a timeout may cause a request/response to
take longer (perhaps _much_ longer) than the timeout configured
by the user.
lib/mogilefs/backend.rb
test/test_mogilefs.rb