mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-21 18:22:00 -08: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 {
|
if appErr != nil {
|
||||||
d := b.Duration()
|
d := b.Duration()
|
||||||
m.log.Debug(appErr.DetailedError)
|
m.log.Debug(appErr.DetailedError)
|
||||||
|
//TODO more generic fix needed
|
||||||
if !strings.Contains(appErr.DetailedError, "connection refused") &&
|
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") {
|
!strings.Contains(appErr.DetailedError, "connection reset by peer") &&
|
||||||
|
!strings.Contains(appErr.DetailedError, "connection timed out") {
|
||||||
if appErr.Message == "" {
|
if appErr.Message == "" {
|
||||||
return errors.New(appErr.DetailedError)
|
return errors.New(appErr.DetailedError)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user