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
Dropping the TLS example almost line-by-line into a test program for AWS IoT caused the server to close the connection when the first subscribe packet is sent.
When I put a time.Sleep(time.Second) in between the cli.Connect and cli.Subscribe calls, then it works just fine. It seems that AWS will close the connection if the subscribe comes too quickly. It seems like the key is to wait until that CONNACK packet is received before continuing with the other messages.
Can we add some sort of event or callback for CONNACK? Like a ConnectedHandler or maybe a buffered channel that sends connection lifecycle events that the main program can read?
The text was updated successfully, but these errors were encountered:
Dropping the TLS example almost line-by-line into a test program for AWS IoT caused the server to close the connection when the first subscribe packet is sent.
When I put a time.Sleep(time.Second) in between the cli.Connect and cli.Subscribe calls, then it works just fine. It seems that AWS will close the connection if the subscribe comes too quickly. It seems like the key is to wait until that CONNACK packet is received before continuing with the other messages.
Can we add some sort of event or callback for CONNACK? Like a ConnectedHandler or maybe a buffered channel that sends connection lifecycle events that the main program can read?
The text was updated successfully, but these errors were encountered: