 			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


					connectParent(superNodes)
			)

		# Safely exit network
		#
		exitNetwork: () =>

			@clearIntervals()

			# Break all relationships
			if @isSuperNode
			 	@setSuperNode(false, true)

			@server.disconnect()


			# Disconnect from all peers
			for peer in @getPeers()
				@removePeer(peer)

		# Selects the supernode with the lowest latency and attempts to connect.
		# If this fails, try the next lowest latency.
		#
