socketcluster-client-go
socketcluster-client-go copied to clipboard
Reconnection , auto channel Subscribe and proper logging
Need to implement reconnection and auto channel subscribe for the client. Implement proper logging using https://github.com/sirupsen/logrus
was this ever implemented? At the moment it is useless for any long running go programs without auto reconnection when internet is lost
some example to copy from here: https://github.com/Freeaqingme/go-socketcluster-client
I need auto-reconnecting too, do you have any tips on how to hack that into this client @sacOO7 or does it absolutely need to be handled in the https://github.com/sacOO7/GoWebsocket dependency?
edit for anyone who has this issue. if you run client.Connect() in onDisconnect handler it seems to work well enough:
func onDisconnect(client scclient.Client, err error) {
fmt.Printf("Error: %s\n", err.Error())
client.Connect()
}
Okay, I will check and let you know : )
On Mon, Mar 8, 2021 at 8:32 AM Steven Aldinger [email protected] wrote:
I need auto-reconnecting too, do you have any tips on how to hack that into this client @sacOO7 https://github.com/sacOO7 or does it absolutely need to be handled in the https://github.com/sacOO7/GoWebsocket dependency?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sacOO7/socketcluster-client-go/issues/1#issuecomment-792426567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7S6SK4MXBDND6CXCXZEYLTCQ45HANCNFSM4EIYD4VA .