Skip to content

Commit

Permalink
oops recvfrom returns a [msg, addr] tuple, not a string
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Feb 5, 2010
1 parent 63f3420 commit 95f93c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/bertrpc/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95f93c3

Please sign in to comment.