 
   incrementConnectionAttemptsCount: =>
     @connectionAttempts += 1
-
-  isMaxConnectionAttemptsReached: =>
-    @connectionAttempts > @MAX_CONNECTION_ATTEMPTS
 
   generateReconnectInterval: () ->
     interval = (Math.pow(2, @connectionAttempts) - 1) * 1000

#= require_tree .

class @Cable
  MAX_CONNECTION_ATTEMPTS: 10
  MAX_CONNECTION_INTERVAL: 5 * 1000
  PING_STALE_INTERVAL: 6


    @disconnected()

    setTimeout =>
      @incrementConnectionAttemptsCount()
      @connect()
    , @generateReconnectInterval()

  resetConnectionAttemptsCount: =>
