tower icon indicating copy to clipboard operation
tower copied to clipboard

Reconnect should not go back to idle poll_ready errors

Open seanmonstar opened this issue 6 years ago • 3 comments

We've decided that if poll_ready returns an error, that means the service is dead. Reconnect currently will try again if its inner MakeService::poll_ready errors: https://github.com/tower-rs/tower/blob/0f58e50c3d86588c977316bf66a4ebeafde2a8e6/tower-reconnect/src/lib.rs#L93

seanmonstar avatar Apr 09 '19 20:04 seanmonstar

Sorry, I was slightly wrong. The issue is that if the MakeService::Future polls into an error (fails to connect), Reconnect will return that error in its poll_ready, but still be ready to try again.

seanmonstar avatar Apr 09 '19 20:04 seanmonstar

@seanmonstar I would imagine this error should be returned via the call, not via poll_ready?

LucioFranco avatar Apr 10 '19 15:04 LucioFranco

Instead of blocking 0.1, we should just remove the tower-reconnect re-export from tower.

seanmonstar avatar Apr 23 '19 17:04 seanmonstar