Permalink
Browse files

Merge branch 'master' of github.com:gimite/web-socket-ruby

  • Loading branch information...
2 parents 825117f + 7f6528e commit c13ae4911f18f9bbae5d81a9bc35edd4a1e98426 @gimite committed Oct 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/web_socket.rb
View
@@ -324,8 +324,8 @@ def send_frame(opcode, payload, mask)
buffer.write([payload.bytesize / (2 ** 32), payload.bytesize % (2 ** 32)].pack("NN"))
end
if mask
- mask_key = Array.new(4){ rand(256) }.pack("C")
- buffer.write(mask_key)
+ mask_key = Array.new(4){ rand(256) }
+ buffer.write(mask_key.pack("C*"))
payload = apply_mask(payload, mask_key)
end
buffer.write(payload)

0 comments on commit c13ae49

Please sign in to comment.