 			else
 				@token.candidates = []
 				@setSuperNode(true)
+
+		clearIntervals: () ->
+			for timer in @timers
+				clearTimeout(timer)

		#
		# @param superNode [Boolean] wether or not to become supernode.
		#
		setSuperNode: (superNode) ->
			if @isSuperNode is superNode
				return


				for child in @getChildren()
					@removeChild(child)

				# Select a new parent if not exiting
				if not exit
					@_selectParent()

		# Is called when a peer disconnects. Will make sure we handle this
		# disconnect in the appropriate manner.
