Ray is never nil

pull/40/head
V2Ray 2015-10-10 20:52:31 +02:00
parent d83ddb4fa7
commit 7f6878fbc3
1 changed files with 1 additions and 3 deletions

View File

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