Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 627ed989824b2795053f15777d25e8bf59a4ac78 Author: Wim <wim@42.be> Date: Fri Nov 04 23:17:40 2016 +0000 Reconnect on connection timed out (mattermost). Fixes #71 diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index aa944a1..38be9b0 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -1259 +12511 @@ 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)   }