Skip to content

Commit

Permalink
Merge pull request #179 from dordille/master
Browse files Browse the repository at this point in the history
Fix possible race condition in websocket heartbeat callback
  • Loading branch information
brycekahle committed Apr 29, 2016
2 parents 989a846 + fd36bab commit 292d4ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trans-websocket.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class WebSocketReceiver extends transport.GenericReceiver
super

heartbeat_timeout: ->
@session.close(3000, 'No response from heartbeat')
if @session?
@session.close(3000, 'No response from heartbeat')



Expand Down

0 comments on commit 292d4ad

Please sign in to comment.