summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-02 20:00:00 +0100
committerWim <wim@42.be>2016-11-02 20:00:00 +0100
commit95fac548bbedb541b1b6d383b2053e7a06a7d8d2 (patch)
treeb2b55f548c52d5614dab7f5c6e1eec9a5ea6ef1f
parent581847f415ac83a2874c7ed9edc157673a4942eb (diff)
downloadmatterbridge-msglm-95fac548bbedb541b1b6d383b2053e7a06a7d8d2.tar.gz
matterbridge-msglm-95fac548bbedb541b1b6d383b2053e7a06a7d8d2.tar.bz2
matterbridge-msglm-95fac548bbedb541b1b6d383b2053e7a06a7d8d2.zip
Reconnect on connection reset by peer (mattermost). Fixes #69
-rw-r--r--matterclient/matterclient.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index 37530480..aa944a18 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -126,7 +126,8 @@ func (m *MMClient) Login() error {
d := b.Duration()
m.log.Debug(appErr.DetailedError)
if !strings.Contains(appErr.DetailedError, "connection refused") &&
- !strings.Contains(appErr.DetailedError, "invalid character") {
+ !strings.Contains(appErr.DetailedError, "invalid character") &&
+ !strings.Contains(appErr.DetailedError, "connection reset by peer") {
if appErr.Message == "" {
return errors.New(appErr.DetailedError)
}