mirror of https://github.com/v2ray/v2ray-core
trace outstanding error only
parent
0f27e0b4d3
commit
d6e9162f78
|
@ -94,7 +94,12 @@ func NewClient(p proxy.Outbound, dialer proxy.Dialer, m *ClientManager) (*Client
|
||||||
go func() {
|
go func() {
|
||||||
if err := p.Process(ctx, pipe, dialer); err != nil {
|
if err := p.Process(ctx, pipe, dialer); err != nil {
|
||||||
cancel()
|
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
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Closed returns true if this Client is closed.
|
||||||
func (m *Client) Closed() bool {
|
func (m *Client) Closed() bool {
|
||||||
select {
|
select {
|
||||||
case <-m.ctx.Done():
|
case <-m.ctx.Done():
|
||||||
|
|
Loading…
Reference in New Issue