From 9bb62ad6b5ffb13fc4e067bea1c2ed13526a9781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Mon, 26 Jun 2023 18:47:52 +0800 Subject: [PATCH] Check duplicated outbound tag --- box_outbound.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/box_outbound.go b/box_outbound.go index d637d766..ed96cd84 100644 --- a/box_outbound.go +++ b/box_outbound.go @@ -19,6 +19,9 @@ func (s *Box) startOutbounds() error { } else { outboundTag = outboundToStart.Tag() } + if _, exists := outbounds[outboundTag]; exists { + return E.New("outbound tag ", outboundTag, " duplicated") + } outboundTags[outboundToStart] = outboundTag outbounds[outboundTag] = outboundToStart }