ignore pusher error code 1006

This commit is contained in:
Sven Fuchs 2013-09-06 16:36:08 +02:00
parent bf8f944ab1
commit 8b1dfd67f9

View File

@ -89,5 +89,13 @@ $.extend Travis.Pusher.prototype,
console.warn(type, object.error) unless @ignoreWarning(type, object.error)
ignoreWarning: (type, error) ->
if message = error?.data?.message
message.indexOf('Existing subscription') == 0 or message.indexOf('No current subscription') == 0
code = error?.data?.code || 0
message = error?.data?.message || ''
@ignoreCode(code) || @ignoreMessage(message)
ignoreCode: (code) ->
code == 1006
ignoreMessage: (message) ->
message.indexOf('Existing subscription') == 0 or message.indexOf('No current subscription') == 0