about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-10-06 02:09:33 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-06 02:09:33 +0000
commit31bbc429f7563120a4be600b90fb1e5574e4b2a1 (patch)
treec5b42ae41167220a1bad70823b2c9669668d6c5d
parent1b680f0b124c0fe7b2aae48543643090c967ad44 (diff)
downloaddtas-31bbc429f7563120a4be600b90fb1e5574e4b2a1.tar.gz
We must define the variable for tracking buffer length.
This only affected non-Linux kernel users.
-rw-r--r--lib/dtas/buffer/read_write.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/dtas/buffer/read_write.rb b/lib/dtas/buffer/read_write.rb
index 1f1e4a7..0044400 100644
--- a/lib/dtas/buffer/read_write.rb
+++ b/lib/dtas/buffer/read_write.rb
@@ -56,7 +56,8 @@ module DTAS::Buffer::ReadWrite # :nodoc:
     bytes = bytes > MAX_AT_ONCE ? MAX_AT_ONCE : bytes
     buf = _rbuf
     @to_io.read(bytes, buf)
-    @bytes_xfer += buf.bytesize
+    n = buf.bytesize
+    @bytes_xfer += n
 
     targets.delete_if do |dst|
       begin