1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +00:00

fix lint errors

This commit is contained in:
Darien Raymond 2018-04-23 16:42:37 +02:00
parent a0dc8d19fa
commit f9c794c795
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 4 additions and 2 deletions

View File

@ -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)
}

View File

@ -143,6 +143,8 @@ func (p *pipe) CloseError() {
return
}
p.state = errord
if !p.data.IsEmpty() {
p.data.Release()
p.data = nil