From d5159713c13859a7d472625ddaa9f9cc4c546236 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 20 May 2010 01:14:43 +0200 Subject: [PATCH 1/1] =?utf8?q?service:=20when=20we=20cannot=20start=20due?= =?utf8?q?=20to=20rate=20lim=C3=ADt=20consider=20that=20a=20real=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/service.c | 2 +- src/unit.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/service.c b/src/service.c index 3e2a499ec..ac83862db 100644 --- a/src/service.c +++ b/src/service.c @@ -1708,7 +1708,7 @@ static int service_start(Unit *u) { /* Make sure we don't enter a busy loop of some kind. */ if (!ratelimit_test(&s->ratelimit)) { log_warning("%s start request repeated too quickly, refusing to start.", u->meta.id); - return -EAGAIN; + return -ECANCELED; } s->failure = false; diff --git a/src/unit.c b/src/unit.c index 8f0b0773f..bcb95b2ad 100644 --- a/src/unit.c +++ b/src/unit.c @@ -735,9 +735,10 @@ fail: } /* Errors: - * -EBADR: This unit type does not support starting. - * -EALREADY: Unit is already started. - * -EAGAIN: An operation is already in progress. Retry later. + * -EBADR: This unit type does not support starting. + * -EALREADY: Unit is already started. + * -EAGAIN: An operation is already in progress. Retry later. + * -ECANCELED: Too many requests for now. */ int unit_start(Unit *u) { UnitActiveState state; -- 2.30.2