Fix close grpc conn

This commit is contained in:
世界 2022-09-14 14:02:33 +08:00
parent ac5582537f
commit 628cf56d3c
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

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