Sorunome / mx-puppet-skype

16 stars 4 forks source link

bridge does not try to reconnect after intial connect failure #7

Closed RuralYak closed 4 years ago

RuralYak commented 4 years ago

In concurrent conditions synapse server might be not ready to receive connection by the time the bridge does its initial connection. So if you are not lucky your bridge stuck in broken state

That is what one can see in the log:

May-2 06:36:25.295 [bot-sdk-Appservice] error: GotError: connect ECONNREFUSED 172.19.0.4:8008
    at onError (/opt/mx-puppet-skype/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
    at handleRequest (/opt/mx-puppet-skype/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1142:16) {
  name: 'RequestError',
  code: 'ECONNREFUSED'
}
(node:1) UnhandledPromiseRejectionWarning: GotError: connect ECONNREFUSED 172.19.0.4:8008
    at onError (/opt/mx-puppet-skype/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
    at handleRequest (/opt/mx-puppet-skype/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1142:16)

It would be nice to have an unlimited number of connection retries.

Sorunome commented 4 years ago

fixed in https://github.com/Sorunome/mx-puppet-bridge/commit/dda4a9e0f1a195e1d60a389a9cb5e015ec9f9d64