about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/revactor.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb
index 21fa72f..b1f0d9b 100644
--- a/lib/rainbows/revactor.rb
+++ b/lib/rainbows/revactor.rb
@@ -149,6 +149,7 @@ module Rainbows
       # Revactor socket reads always return an unspecified amount,
       # sometimes too much
       def readpartial(length, dst = "")
+        return dst if length == 0
         # always check and return from the userspace buffer first
         rbuf.size > 0 and return dst.replace(rbuf.read(length))