Release the authorization lock on client initialization error
This commit is contained in:
parent
b3edc45526
commit
25e8c98c3e
|
@ -112,6 +112,7 @@ func (c *Client) Connect(resource string) error {
|
|||
|
||||
tdlibClient, err := client.NewClient(c.authorizer, c.options...)
|
||||
if err != nil {
|
||||
c.locks.authorizationReady.Done()
|
||||
return errors.Wrap(err, "Couldn't initialize a Telegram client instance")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue