sacOO7 / socketcluster-client-go

GO client for socketcluster
https://socketcluster.io/
Apache License 2.0
55 stars 20 forks source link

error handling for events #9

Open u007 opened 5 years ago

u007 commented 5 years ago

hi, it would be best practice to have error handling in callbacks that handle exception and return the error back to the connector, especially when its not run via go routine.

onConnect, onDisconnect, onConnectError, onAuthentication, onSetAuthentication

thank you

u007 commented 5 years ago

hi,

i saw that liveClient.Client.Connect() will not return anything, is it because there is a auto reconnect on failure? but i think it should return error if the client is unable to connect for the first time. at least it should give up first if first attempt fail, alike how nginx proxy works