1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

fix lint errors

This commit is contained in:
Darien Raymond 2018-04-11 20:17:19 +02:00
parent 622cb529a9
commit d2470e2cdb
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -76,15 +76,13 @@ func (h *Handler) Tag() string {
// Dispatch implements proxy.Outbound.Dispatch.
func (h *Handler) Dispatch(ctx context.Context, outboundRay ray.OutboundRay) {
if h.mux != nil {
err := h.mux.Dispatch(ctx, outboundRay)
if err != nil {
if err := h.mux.Dispatch(ctx, outboundRay); err != nil {
newError("failed to process outbound traffic").Base(err).WithContext(ctx).WriteToLog()
outboundRay.OutboundOutput().CloseError()
}
} else {
err := h.proxy.Process(ctx, outboundRay, h)
// Ensure outbound ray is properly closed.
if err != nil {
if err := h.proxy.Process(ctx, outboundRay, h); err != nil {
// Ensure outbound ray is properly closed.
newError("failed to process outbound traffic").Base(err).WithContext(ctx).WriteToLog()
outboundRay.OutboundOutput().CloseError()
} else {