Skip to content

Commit

Permalink
trigger connection establish error
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatprabha committed Aug 8, 2023
1 parent 33ef257 commit 27e4ff6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func (c *Client) newClient(addrs []TCPAddress, attempt int) mqtt.Client {

if err := t.Error(); err != nil {
// TODO: add retry backoff or use ExponentialStartStrategy utility
if c.options.onConnectionLostHandler != nil {
c.options.onConnectionLostHandler(err)
}

return c.newClient(addrs, attempt+1)
}

Expand Down

0 comments on commit 27e4ff6

Please sign in to comment.