1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 01:05:35 -05:00

rename CloseError() to Interrupt()

This commit is contained in:
Darien Raymond
2018-12-31 21:25:10 +01:00
parent d35c407419
commit 3de8389361
21 changed files with 66 additions and 69 deletions

View File

@@ -100,17 +100,17 @@ func (h *Handler) Dispatch(ctx context.Context, link *transport.Link) {
if h.mux != nil {
if err := h.mux.Dispatch(ctx, link); err != nil {
newError("failed to process mux outbound traffic").Base(err).WriteToLog(session.ExportIDToError(ctx))
pipe.CloseError(link.Writer)
common.Interrupt(link.Writer)
}
} else {
if err := h.proxy.Process(ctx, link, h); err != nil {
// Ensure outbound ray is properly closed.
newError("failed to process outbound traffic").Base(err).WriteToLog(session.ExportIDToError(ctx))
pipe.CloseError(link.Writer)
common.Interrupt(link.Writer)
} else {
common.Must(common.Close(link.Writer))
}
pipe.CloseError(link.Reader)
common.Interrupt(link.Reader)
}
}