diff --git a/app/proxyman/mux/mux.go b/app/proxyman/mux/mux.go index 171aa318e..ab1732207 100644 --- a/app/proxyman/mux/mux.go +++ b/app/proxyman/mux/mux.go @@ -94,7 +94,12 @@ func NewClient(p proxy.Outbound, dialer proxy.Dialer, m *ClientManager) (*Client go func() { if err := p.Process(ctx, pipe, dialer); err != nil { cancel() - log.Trace(errors.New("failed to handler mux client connection").Base(err).AtWarning()) + + traceErr := errors.New("failed to handler mux client connection").Base(err) + if err != io.EOF && err != context.Canceled { + traceErr = traceErr.AtWarning() + } + log.Trace(traceErr) } }() @@ -111,6 +116,7 @@ func NewClient(p proxy.Outbound, dialer proxy.Dialer, m *ClientManager) (*Client return c, nil } +// Closed returns true if this Client is closed. func (m *Client) Closed() bool { select { case <-m.ctx.Done():