diff --git a/service.go b/service.go index c997307..cf6ccf1 100644 --- a/service.go +++ b/service.go @@ -8,9 +8,9 @@ import ( func (c *Client) handleReconnect(addr string) { for { - c.mutex.Lock() - c.isReady = false - c.mutex.Unlock() + //c.mutex.Lock() + //c.isReady = false + //c.mutex.Unlock() c.logger.Println("Connecting to server...") @@ -45,9 +45,9 @@ func (c *Client) connect(addr string) (*amqp.Connection, error) { func (c *Client) handleReInit(conn *amqp.Connection) bool { for { - c.mutex.Lock() - c.isReady = false - c.mutex.Unlock() + //c.mutex.Lock() + //c.isReady = false + //c.mutex.Unlock() if err := c.init(conn); err != nil { c.logger.Printf("Failed to initialize connection: %s", err)