diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-02-02 13:01:24 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-02-20 13:38:32 +0100 |
commit | f274f8bf256702c5fd0c68d3f7bd6aeba74dfcf0 (patch) | |
tree | 7df1cc9d8cc255ba8c35910b99c5d97dfc57f00a /src/sleep | |
parent | 135e5a201a3eb411a6767c1c16e704eaa0431d33 (diff) | |
download | systemd-f274f8bf256702c5fd0c68d3f7bd6aeba74dfcf0.tar.gz |
sleep: use shared constant for freeze timeout
Let's keep all the timeout definitions in one place.
Diffstat (limited to 'src/sleep')
-rw-r--r-- | src/sleep/sleep.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 9c51a3367f..9018188cba 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -382,8 +382,7 @@ static int freeze_thaw_user_slice(const char **method) { if (r < 0) return log_debug_errno(r, "Failed to open connection to systemd: %m"); - /* Wait for 1.5 seconds at maximum for freeze operation */ - (void) sd_bus_set_method_call_timeout(bus, 1500 * USEC_PER_MSEC); + (void) sd_bus_set_method_call_timeout(bus, FREEZE_TIMEOUT); r = bus_call_method(bus, bus_systemd_mgr, *method, &error, NULL, "s", SPECIAL_USER_SLICE); if (r < 0) |