diff options
author | Wim <wim@42.be> | 2016-11-04 23:17:40 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2016-11-04 23:17:49 +0100 |
commit | 50a0df427927b60724d8e6e00ba06822e0aa7308 (patch) | |
tree | b117028512214293cc6d68ca491638fb947fdecc | |
parent | c3a8b7a997f5baf2579c58fdadead7e428ef0061 (diff) | |
download | matterbridge-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.go | 4 |
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) } |