From c532e2fe4f6406ca07b8382ccb833d7ead25d2c3 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 2 Apr 2016 13:49:49 +1300 Subject: [PATCH] libnmdc: include error messages with EVENT_CONNECTION_STATE_CHANGED --- src/libnmdc/libnmdc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnmdc/libnmdc.go b/src/libnmdc/libnmdc.go index 85bfadb..b8f6227 100644 --- a/src/libnmdc/libnmdc.go +++ b/src/libnmdc/libnmdc.go @@ -343,7 +343,7 @@ func (this *HubConnection) worker() { // Maybe we disconnected 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 time.Sleep(30 * time.Second) // Wait before reconnect continue