add Stop() to Client
This commit is contained in:
parent
ef52e705ae
commit
0eea5d02de
|
@ -67,6 +67,8 @@ func NewClient(authorizationStateHandler AuthorizationStateHandler, options ...O
|
|||
|
||||
err := Authorize(client, authorizationStateHandler)
|
||||
if err != nil {
|
||||
client.Stop()
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -143,3 +145,8 @@ func (client *Client) GetListener() *Listener {
|
|||
|
||||
return listener
|
||||
}
|
||||
|
||||
func (client *Client) Stop() {
|
||||
client.Destroy()
|
||||
client.jsonClient.Destroy()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue