浏览代码

Fix close grpc conn

世界 3 年之前
父节点
当前提交
628cf56d3c
共有 1 个文件被更改,包括 3 次插入1 次删除
  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) {