diff --git a/client.coffee b/client.coffee index ac6c712..6e156e8 100644 --- a/client.coffee +++ b/client.coffee @@ -13,6 +13,13 @@ class Client handleEvents: () -> @ws.on 'message', @.handleMessage.bind(@) + @ws.on 'error', @.handleError.bind(@) + + handleError: (error) -> + req = @ws.upgradeReq + headers = req.headers + console.log "evt=client_error", "x_forwarded_for=#{headers['x-forwarded-for']}" + console.log "Error: ", error handleMessage: (message) -> try