mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
Keep running unconnected actor forever if backoff
says so
This commit is contained in:
parent
3bbda68adf
commit
6624af63e3
@ -77,8 +77,6 @@ impl Actor for RedisActor {
|
|||||||
// we stop current context, supervisor will restart it.
|
// we stop current context, supervisor will restart it.
|
||||||
if let Some(timeout) = act.backoff.next_backoff() {
|
if let Some(timeout) = act.backoff.next_backoff() {
|
||||||
ctx.run_later(timeout, |_, ctx| ctx.stop());
|
ctx.run_later(timeout, |_, ctx| ctx.stop());
|
||||||
} else {
|
|
||||||
ctx.stop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -88,8 +86,6 @@ impl Actor for RedisActor {
|
|||||||
// we stop current context, supervisor will restart it.
|
// we stop current context, supervisor will restart it.
|
||||||
if let Some(timeout) = act.backoff.next_backoff() {
|
if let Some(timeout) = act.backoff.next_backoff() {
|
||||||
ctx.run_later(timeout, |_, ctx| ctx.stop());
|
ctx.run_later(timeout, |_, ctx| ctx.stop());
|
||||||
} else {
|
|
||||||
ctx.stop();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.wait(ctx);
|
.wait(ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user