class Protocol::HTTP2::Dependency

def process_priority(priority)

def process_priority(priority)
	dependent_id = priority.stream_dependency
	
	if dependent_id == @id
		raise ProtocolError, "Stream priority for stream id #{@id} cannot depend on itself!"
	end
	
	@weight = priority.weight
	
	# We essentially ignore `dependent_id` if the dependency does not exist:
	if parent = @connection.dependencies[dependent_id]
		if priority.exclusive
			@parent.remove_child(self)
			
			parent.exclusive_child(self)
		elsif !@parent.equal?(parent)
			@parent.remove_child(self)
			
			parent.add_child(self)
		end
	end
end