status-im / status-console-client

Status messaging console user interface
Mozilla Public License 2.0
10 stars 2 forks source link

Status client can't connect to selected mail server after being offline for long period of time #100

Open dshulyak opened 5 years ago

dshulyak commented 5 years ago

After disabling network connection for > 30s status node won't be able to connect to mail server in reasonable time. So request fails in the end.

I think the root cause is the same as on macos desktop client that can't connect to mailserver. It is probably needs to be fixed ethereum devp2p server, but will track it here for a while.

dshulyak commented 5 years ago
t=2019-06-26T07:41:26+0000 lvl=trce msg="Dial task done" task="wait for dial hist expire (29.988798556s)"

So, the code in ethereum/p2p/dial.go ensures that we don't dial same peer sooner than 30s from previous dial. because p2p/server.go will try to dial every static peer in a loop without this rate limiter, so we clearly can't simply remove it.

I think the cleanest way we could do it is to remove this limit when srv.AddPeer is called, as we do that before each history request it will ensure that dial will happen immediatly