You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a client written using your Example Client Test using the reconnection logic in there that I have been testing and hit an issue where it would not reconnect, but would get stuck when trying to create a new Channel on a broken Connection.
client.logger.Println("Failed to initialize channel. Retrying...")
select {
case<-client.done:
returntrue
case<-time.After(reInitDelay):
}
continue
}
Reproduction steps
I found this by complete accident.
My app is running on a box that has a wired ethernet connection and a 4G backup. I was testing failing over to the 4G backup by physically pulling the ethernet cable from the box. And then reconnecting to test failing back to wired.
In doing this several times I just happened to hit the right timing where the wired connection was dropped between the connection being created successfully and the channel creation call being made.
I've no idea how you would automate this test!
Expected behavior
Example code that demonstrates reconnection should reconnect 😊
Additional context
This looks like a pretty simple fix, by adding a check of the client.notifyConnClose in that select block, I'll create a PR shortly.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a client written using your Example Client Test using the reconnection logic in there that I have been testing and hit an issue where it would not reconnect, but would get stuck when trying to create a new Channel on a broken Connection.
This code is the problem:
amqp091-go/example_client_test.go
Lines 199 to 210 in f706086
Reproduction steps
I found this by complete accident.
My app is running on a box that has a wired ethernet connection and a 4G backup. I was testing failing over to the 4G backup by physically pulling the ethernet cable from the box. And then reconnecting to test failing back to wired.
In doing this several times I just happened to hit the right timing where the wired connection was dropped between the connection being created successfully and the channel creation call being made.
I've no idea how you would automate this test!
Expected behavior
Example code that demonstrates reconnection should reconnect 😊
Additional context
This looks like a pretty simple fix, by adding a check of the
client.notifyConnClose
in thatselect
block, I'll create a PR shortly.The text was updated successfully, but these errors were encountered: