isReady disabled
This commit is contained in:
parent
8f967361e8
commit
5e8661cfcd
1 changed files with 6 additions and 6 deletions
12
service.go
12
service.go
|
|
@ -8,9 +8,9 @@ import (
|
||||||
|
|
||||||
func (c *Client) handleReconnect(addr string) {
|
func (c *Client) handleReconnect(addr string) {
|
||||||
for {
|
for {
|
||||||
c.mutex.Lock()
|
//c.mutex.Lock()
|
||||||
c.isReady = false
|
//c.isReady = false
|
||||||
c.mutex.Unlock()
|
//c.mutex.Unlock()
|
||||||
|
|
||||||
c.logger.Println("Connecting to server...")
|
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 {
|
func (c *Client) handleReInit(conn *amqp.Connection) bool {
|
||||||
for {
|
for {
|
||||||
c.mutex.Lock()
|
//c.mutex.Lock()
|
||||||
c.isReady = false
|
//c.isReady = false
|
||||||
c.mutex.Unlock()
|
//c.mutex.Unlock()
|
||||||
|
|
||||||
if err := c.init(conn); err != nil {
|
if err := c.init(conn); err != nil {
|
||||||
c.logger.Printf("Failed to initialize connection: %s", err)
|
c.logger.Printf("Failed to initialize connection: %s", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue