diff --git a/lib/skinny.rb b/lib/skinny.rb index 719ff82..3eb8755 100644 --- a/lib/skinny.rb +++ b/lib/skinny.rb @@ -175,7 +175,7 @@ def handshake! def receive_data data @buffer += data - process_frame if @handshook + EM.next_tick { process_frame } if @state == :handshook rescue error! "Error while receiving WebSocket data" end