소스 검색

Ray is never nil

V2Ray 10 년 전
부모
커밋
7f6878fbc3
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      proxy/freedom/freedom.go

+ 1 - 3
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)
 	}