Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

oops recvfrom returns a [msg, addr] tuple, not a string

  • Loading branch information...
commit 95f93c3588f4f3f35893888806bfe56252332b77 1 parent 63f3420
@rtomayko rtomayko authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/bertrpc/action.rb
View
5 lib/bertrpc/action.rb
@@ -28,8 +28,9 @@ def read(sock, len, timeout)
while size < len
r, w, e = select([sock], [], [], timeout)
raise Errno::EAGAIN if r.nil?
- data << sock.recvfrom(len - size)
- size += data.last.size
+ msg, sender = sock.recvfrom(len - size)
+ size += msg.size
+ data << msg
end
data.join ''
end
Please sign in to comment.
Something went wrong with that request. Please try again.