diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-05-14 01:32:11 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-05-14 01:32:11 +0300 |
commit | 25e8c98c3ea2e9249416e70cea6c9818757ddff2 (patch) | |
tree | 54a33f8447e0dc551cffc68d8f3d452a9fe734f3 | |
parent | b3edc455262b0443ac2baddba96cc2d7e350ef13 (diff) |
Release the authorization lock on client initialization error
-rw-r--r-- | telegram/connect.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/telegram/connect.go b/telegram/connect.go index a4dfa37..37f719e 100644 --- a/telegram/connect.go +++ b/telegram/connect.go @@ -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") } |