1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +01:00
This commit is contained in:
Nikolay Kim 2018-01-22 10:43:36 -08:00
parent 91709bc17f
commit 7910c7b511

View File

@ -53,7 +53,8 @@ impl Actor for RedisActor {
.map_err(|err, act, ctx| {
error!("Can not connect to redis server: {}", err);
debug!("{:?}", err);
// re-connect with backoff time
// re-connect with backoff time.
// we stop currect context, supervisor will restart it.
if let Some(timeout) = act.backoff.next_backoff() {
ctx.run_later(timeout, |_, ctx| ctx.stop());
} else {