 
     onPoll: =>
       if @isPolling()
-        setTimeout @poll, @get('timeout')
+        @timeout = setTimeout(@poll, @get('timeout'))
       else
         @pollDfd.resolve()
         @trigger 'complete'

    initialize: ->
      @pollDfd = new $.Deferred
      @on 'change:url', => @poll() if @isPolling()

    url: ->
      @get 'url'

define ['Backbone', 'jquery'], ({Model}, $) ->

  # Works with the progress API. Will poll its url until the `workflow_state`
  # is completed.
