eclair icon indicating copy to clipboard operation
eclair copied to clipboard

Don't reconnect to dead peers at startup

Open pm47 opened this issue 3 years ago • 0 comments

Currently, at startup we attempt to reconnect to all peers with which we have a channel, even if we were disconnected for a long time when eclair was stopped.

https://github.com/ACINQ/eclair/blob/57bf86044ec4e2ff09d9639e986d04f88fde2305/eclair-core/src/main/scala/fr/acinq/eclair/io/ReconnectionTask.scala#L86

Note that we only try once, and then we immediately set a large delay before attempting a reconnection:

https://github.com/ACINQ/eclair/blob/57bf86044ec4e2ff09d9639e986d04f88fde2305/eclair-core/src/main/scala/fr/acinq/eclair/io/ReconnectionTask.scala#L92-L97

But we could be even more aggressive and not attempt at all to reconnect: we could instead simply pick up the exponential backoff delay for reconnection where we left it.

pm47 avatar Oct 11 '21 13:10 pm47