From 446059f8dcd3ab0f394a9381e0e2c94b2234f77e Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 19 Feb 2018 17:51:10 +0100 Subject: [PATCH] fix error handling in outbound handler --- app/proxyman/outbound/handler.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index d3c237e16..63a4ec55b 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -2,13 +2,11 @@ package outbound import ( "context" - "io" "v2ray.com/core" "v2ray.com/core/app/proxyman" "v2ray.com/core/app/proxyman/mux" "v2ray.com/core/common" - "v2ray.com/core/common/errors" "v2ray.com/core/common/net" "v2ray.com/core/proxy" "v2ray.com/core/transport/internet" @@ -89,7 +87,7 @@ func (h *Handler) Dispatch(ctx context.Context, outboundRay ray.OutboundRay) { } else { err := h.proxy.Process(ctx, outboundRay, h) // Ensure outbound ray is properly closed. - if err != nil && errors.Cause(err) != io.EOF { + if err != nil { newError("failed to process outbound traffic").Base(err).WriteToLog() outboundRay.OutboundOutput().CloseError() } else {