 	on_changes: (response) =>
 		check_updates = []
 		reload_needed = false
+		# @todo reset @_send_backoff to @_backoff_min when we receive any data, not just changes
 		@_send_backoff = @_backoff_min
 		console.log "#{@name}: on_changes(): response="
 		console.log response

			id = change['id']
			console.log "#{@name}: processing id=#{id}"
			pending_to_delete = []
			for pending in @data.send_queue
				if change['clientid'] is @clientid and id is pending['id']
#                    console.log "#{@name}: deleting change for id #{id}"
					change['local'] = true
					pending_to_delete.push pending
					check_updates.push id
			for pd in pending_to_delete
				@data.store[pd['id']]['change'] = null
				@_save_entity pd['id']

	# Runs on a timeout to send any pending changes.
	# Queues each change to rerun in case of failure.
	# For each failure, the timeout delay increases.
	_send_changes: =>
		if @data.send_queue.length is 0
			console.log "#{@name}: send_queue empty, done"
			@data.send_queue_timer = null
			return
		if not @s.connected
			console.log "#{@name}: _send_changes: not connected", @_send_backoff
		else
			for change in @data.send_queue
				console.log "#{@name}: sending change: #{JSON.stringify(change)}"
				@send("c:#{JSON.stringify(change)}")

		@_send_backoff = @_send_backoff * 2
		if @_send_backoff > @_backoff_max
			@_send_backoff = @_backoff_max

		@data.send_queue_timer = setTimeout @_send_changes, @_send_backoff

