3
0
mirror of https://github.com/42wim/matterbridge.git synced 2024-12-21 10:32:35 +01:00

Reconnect on connection timed out (mattermost). Fixes

This commit is contained in:
Wim 2016-11-04 23:17:40 +01:00
parent c3a8b7a997
commit 50a0df4279

View File

@ -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)
}