mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
fix lint errors
This commit is contained in:
parent
a0dc8d19fa
commit
f9c794c795
@ -77,7 +77,7 @@ func (h *Handler) Tag() string {
|
||||
func (h *Handler) Dispatch(ctx context.Context, link *core.Link) {
|
||||
if h.mux != nil {
|
||||
if err := h.mux.Dispatch(ctx, link); err != nil {
|
||||
newError("failed to process outbound traffic").Base(err).WithContext(ctx).WriteToLog()
|
||||
newError("failed to process mux outbound traffic").Base(err).WithContext(ctx).WriteToLog()
|
||||
pipe.CloseError(link.Writer)
|
||||
}
|
||||
} else {
|
||||
@ -86,7 +86,7 @@ func (h *Handler) Dispatch(ctx context.Context, link *core.Link) {
|
||||
newError("failed to process outbound traffic").Base(err).WithContext(ctx).WriteToLog()
|
||||
pipe.CloseError(link.Writer)
|
||||
} else {
|
||||
common.Close(link.Writer)
|
||||
common.Must(common.Close(link.Writer))
|
||||
}
|
||||
pipe.CloseError(link.Reader)
|
||||
}
|
||||
|
@ -143,6 +143,8 @@ func (p *pipe) CloseError() {
|
||||
return
|
||||
}
|
||||
|
||||
p.state = errord
|
||||
|
||||
if !p.data.IsEmpty() {
|
||||
p.data.Release()
|
||||
p.data = nil
|
||||
|
Loading…
Reference in New Issue
Block a user