From 8f1c4b7f71177a5f23d24699136db0eeeb1e5a81 Mon Sep 17 00:00:00 2001 From: v2ray Date: Mon, 11 Jan 2016 12:35:36 +0100 Subject: [PATCH] simplify code --- shell/point/point.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shell/point/point.go b/shell/point/point.go index 888f70dc2..300f8c039 100644 --- a/shell/point/point.go +++ b/shell/point/point.go @@ -160,10 +160,8 @@ func (this *Point) DispatchToOutbound(context app.Context, packet v2net.Packet) dispatcher := this.och if this.router != nil { - tag, err := this.router.TakeDetour(dest) - if err == nil { - handler, found := this.odh[tag] - if found { + if tag, err := this.router.TakeDetour(dest); err == nil { + if handler, found := this.odh[tag]; found { dispatcher = handler } }