mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-21 10:32:35 +01:00
Reconnect on connection timed out (mattermost). Fixes #71
This commit is contained in:
parent
c3a8b7a997
commit
50a0df4279
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user