summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-04 23:17:40 +0100
committerWim <wim@42.be>2016-11-04 23:17:49 +0100
commit50a0df427927b60724d8e6e00ba06822e0aa7308 (patch)
treeb117028512214293cc6d68ca491638fb947fdecc
parentc3a8b7a997f5baf2579c58fdadead7e428ef0061 (diff)
downloadmatterbridge-msglm-50a0df427927b60724d8e6e00ba06822e0aa7308.tar.gz
matterbridge-msglm-50a0df427927b60724d8e6e00ba06822e0aa7308.tar.bz2
matterbridge-msglm-50a0df427927b60724d8e6e00ba06822e0aa7308.zip
Reconnect on connection timed out (mattermost). Fixes #71
-rw-r--r--matterclient/matterclient.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index aa944a18..38be9b00 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -125,9 +125,11 @@ func (m *MMClient) Login() error {
if appErr != nil {
d := b.Duration()
m.log.Debug(appErr.DetailedError)
+ //TODO more generic fix needed
if !strings.Contains(appErr.DetailedError, "connection refused") &&
!strings.Contains(appErr.DetailedError, "invalid character") &&
- !strings.Contains(appErr.DetailedError, "connection reset by peer") {
+ !strings.Contains(appErr.DetailedError, "connection reset by peer") &&
+ !strings.Contains(appErr.DetailedError, "connection timed out") {
if appErr.Message == "" {
return errors.New(appErr.DetailedError)
}