lib/em-websocket/framing07.rb in em-websocket-0.3.1 vs lib/em-websocket/framing07.rb in em-websocket-0.3.2
- old
+ new
@@ -87,10 +87,11 @@
end
if !fin
debug [:moreframe, frame_type, application_data]
@application_data_buffer << application_data
- @frame_type = frame_type
+ # The message type is passed in the first frame
+ @frame_type ||= frame_type
else
# Message is complete
if frame_type == :continuation
@application_data_buffer << application_data
message(@frame_type, '', @application_data_buffer)