Fix close grpc conn

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

View file

@ -62,7 +62,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) {