From 7f6878fbc37958b1d5eb48e8244e4265243cb73b Mon Sep 17 00:00:00 2001 From: V2Ray Date: Sat, 10 Oct 2015 20:52:31 +0200 Subject: [PATCH] Ray is never nil --- proxy/freedom/freedom.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/proxy/freedom/freedom.go b/proxy/freedom/freedom.go index 528d24fb8..2106e6305 100644 --- a/proxy/freedom/freedom.go +++ b/proxy/freedom/freedom.go @@ -21,9 +21,7 @@ func (vconn *FreedomConnection) Dispatch(firstPacket v2net.Packet, ray core.Outb conn, err := net.Dial(firstPacket.Destination().Network(), firstPacket.Destination().Address().String()) log.Info("Freedom: Opening connection to %s", firstPacket.Destination().String()) if err != nil { - if ray != nil { - close(ray.OutboundOutput()) - } + close(ray.OutboundOutput()) return log.Error("Freedom: Failed to open connection: %s : %v", firstPacket.Destination().String(), err) }