diff --git a/src/trans-websocket.coffee b/src/trans-websocket.coffee index 7712f62f..57716faf 100644 --- a/src/trans-websocket.coffee +++ b/src/trans-websocket.coffee @@ -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')