From d2470e2cdbda98db042a2d48c15c88d182c63514 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 11 Apr 2018 20:17:19 +0200 Subject: [PATCH] fix lint errors --- app/proxyman/outbound/handler.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index 0080152c..55205d40 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -76,15 +76,13 @@ func (h *Handler) Tag() string { // Dispatch implements proxy.Outbound.Dispatch. func (h *Handler) Dispatch(ctx context.Context, outboundRay ray.OutboundRay) { if h.mux != nil { - err := h.mux.Dispatch(ctx, outboundRay) - if err != nil { + if err := h.mux.Dispatch(ctx, outboundRay); err != nil { newError("failed to process outbound traffic").Base(err).WithContext(ctx).WriteToLog() outboundRay.OutboundOutput().CloseError() } } else { - err := h.proxy.Process(ctx, outboundRay, h) - // Ensure outbound ray is properly closed. - if err != nil { + if err := h.proxy.Process(ctx, outboundRay, h); err != nil { + // Ensure outbound ray is properly closed. newError("failed to process outbound traffic").Base(err).WithContext(ctx).WriteToLog() outboundRay.OutboundOutput().CloseError() } else {