From a919e84b911511ed641b3edcf7b77687abc07f44 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 7 Nov 2011 09:36:59 +0000 Subject: http_file: remove unnecessary check There's only one place where we close the socket --- lib/mogilefs/http_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mogilefs/http_file.rb b/lib/mogilefs/http_file.rb index a7e687f..f07c48c 100644 --- a/lib/mogilefs/http_file.rb +++ b/lib/mogilefs/http_file.rb @@ -108,7 +108,7 @@ class MogileFS::HTTPFile < StringIO raise UnparseableResponseError, "Response line not understood: #{line}" end ensure - sock.close if sock && ! sock.closed? + sock.close if sock end def commit -- cgit v1.2.3-24-ge0c7