options added

This commit is contained in:
nquidox 2026-02-20 15:31:13 +03:00
parent 8b1bc57cd0
commit 3f0401de1d
5 changed files with 91 additions and 44 deletions

View file

@ -22,7 +22,7 @@ func (c *Client) handleReconnect(addr string) {
select {
case <-c.done:
return
case <-time.After(c.reconnectDelay):
case <-time.After(c.opts.reconnectDelay):
}
continue
}
@ -59,7 +59,7 @@ func (c *Client) handleReInit(conn *amqp.Connection) bool {
case <-c.notifyConnClose:
c.logger.Println("Connection closed. Reconnecting...")
return false
case <-time.After(c.reInitDelay):
case <-time.After(c.opts.reInitDelay):
}
continue
}
@ -129,7 +129,7 @@ func (c *Client) Push(data []byte) error {
select {
case <-c.done:
return errShutdown
case <-time.After(c.resendDelay):
case <-time.After(c.opts.resendDelay):
}
continue
}