Explorar o código

Fix close grpc conn

世界 %!s(int64=3) %!d(string=hai) anos
pai
achega
628cf56d3c
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      transport/v2raygrpc/client.go

+ 3 - 1
transport/v2raygrpc/client.go

@@ -66,7 +66,9 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
 }
 
 func (c *Client) Close() error {
-	return common.Close(c.conn)
+	return common.Close(
+		common.PtrOrNil(c.conn),
+	)
 }
 
 func (c *Client) connect() (*grpc.ClientConn, error) {