Skip to content

Commit

Permalink
connector/client: don't explode if client not available on connection…
Browse files Browse the repository at this point in the history
… state change

Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Nov 20, 2024
1 parent 21ef73d commit 844f318
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ func (t *TelegramClient) onConnectionStateChange(reason string) func() {
log.Info().Msg("Connection state changed")
ctx := log.WithContext(context.Background())

if t.client == nil {
return
}

authStatus, err := t.client.Auth().Status(ctx)
if err != nil {
t.sendUnknownError(err.Error())
Expand Down

0 comments on commit 844f318

Please sign in to comment.