anchor.diff:    isConnected: -> @client?.getState() is "CONNECTED"
   
     subscribe: (channel, callback) -> 
  -    @subscriptions.push(@client.subscribe channel, callback)
  -
  +    subscription = new Sync.Faye.Subscription(@client, channel, callback)
  +    @subscriptions.push(subscription)
  +    subscription
   
     unsubscribeAll: ->
       subscription.cancel() for subscription in @subscriptions
       @subscriptions = []
   
   
  +class Sync.Faye.Subscription
  +  constructor: (@client, channel, callback) ->
  +    @fayeSub = @client.subscribe channel, callback
  +    
  +  cancel: ->
  +    @fayeSub.cancel()
  +    
  +    
   class Sync.Pusher
   
     subscriptions: []
  
positive.code: 
  
    destroy: ->
      @$start.remove()
      @$end.remove()
      @$el?.remove()
  
negative.code: 
  
    subscribe: ->
      @subscriptionUpdate = @adapter.subscribe @channelUpdate, (data) =>
        if @refetch
          @refetchFromServer (html) => @update(html)
        else
          @update(data.html)
  
      @subscriptionDestroy = @adapter.subscribe @channelDestroy, => @remove()
  
    
    update: (html) -> @view.beforeUpdate(html, {})
  