Skip to content

Commit

Permalink
close dataBloe. see facebook/react-native#16732
Browse files Browse the repository at this point in the history
  • Loading branch information
kesha-antonov committed Dec 18, 2017
1 parent 3b655eb commit b4d7d86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/action_cable/connection.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ class Connection

events:
message: (event) ->
return unless @isProtocolSupported()
{identifier, message, type} = JSON.parse(event.data)
unless @isProtocolSupported()
event.data.close()
return

{ identifier, message, type } = JSON.parse(event.data)
event.data.close()

switch type
when message_types.welcome
@monitor.recordConnect()
Expand Down

0 comments on commit b4d7d86

Please sign in to comment.