libnmdc: include error messages with EVENT_CONNECTION_STATE_CHANGED
This commit is contained in:
parent
433c1ddac9
commit
c532e2fe4f
@ -343,7 +343,7 @@ func (this *HubConnection) worker() {
|
|||||||
|
|
||||||
// Maybe we disconnected
|
// Maybe we disconnected
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.OnEvent <- HubEvent{EventType: EVENT_CONNECTION_STATE_CHANGED, StateChange: CONNECTIONSTATE_DISCONNECTED}
|
this.OnEvent <- HubEvent{EventType: EVENT_CONNECTION_STATE_CHANGED, StateChange: CONNECTIONSTATE_DISCONNECTED, Message: err.Error()}
|
||||||
this.conn = nil
|
this.conn = nil
|
||||||
time.Sleep(30 * time.Second) // Wait before reconnect
|
time.Sleep(30 * time.Second) // Wait before reconnect
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user