浏览代码

app/dispatcher/default.go: Close link when routedDispatch() failed (#5131)

patterniha 1 月之前
父节点
当前提交
3167e5cec0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/dispatcher/default.go

+ 2 - 0
app/dispatcher/default.go

@@ -483,6 +483,8 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport.
 				handler = h
 				handler = h
 			} else {
 			} else {
 				errors.LogWarning(ctx, "non existing outTag: ", outTag)
 				errors.LogWarning(ctx, "non existing outTag: ", outTag)
+				common.Close(link.Writer)
+				common.Interrupt(link.Reader)
 				return // DO NOT CHANGE: the traffic shouldn't be processed by default outbound if the specified outbound tag doesn't exist (yet), e.g., VLESS Reverse Proxy
 				return // DO NOT CHANGE: the traffic shouldn't be processed by default outbound if the specified outbound tag doesn't exist (yet), e.g., VLESS Reverse Proxy
 			}
 			}
 		} else {
 		} else {