about summary refs log tree commit homepage
path: root/lib/mogilefs/socket_common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mogilefs/socket_common.rb')
-rw-r--r--lib/mogilefs/socket_common.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mogilefs/socket_common.rb b/lib/mogilefs/socket_common.rb
index 1196452..fa77432 100644
--- a/lib/mogilefs/socket_common.rb
+++ b/lib/mogilefs/socket_common.rb
@@ -24,7 +24,7 @@ module MogileFS::SocketCommon
 
   SEP_RE = /\A(.*?#{Regexp.escape("\n")})/
   def timed_gets(timeout = 5)
-    unless defined?(@rbuf)
+    unless defined?(@rbuf) && @rbuf
       @rbuf = timed_read(1024, "", timeout) or return # EOF
     end
     begin