]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
terminal-util: extend timeout on background color request
authorLennart Poettering <lennart@poettering.net>
Wed, 17 Jul 2024 15:57:12 +0000 (17:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jul 2024 09:44:04 +0000 (11:44 +0200)
I managed to hit the timeout a couple of times inside of slow qemu.
Let's increase it a bit to 1/3s

src/basic/terminal-util.c

index 635b5f62ee44d6e5d98849f94bb95a724f5bf2eb..df091c36a96bfb99e7568de000049c85f3e81350 100644 (file)
@@ -1829,7 +1829,7 @@ int get_default_background_color(double *ret_red, double *ret_green, double *ret
         if (r < 0)
                 goto finish;
 
-        usec_t end = usec_add(now(CLOCK_MONOTONIC), 100 * USEC_PER_MSEC);
+        usec_t end = usec_add(now(CLOCK_MONOTONIC), 333 * USEC_PER_MSEC);
         char buf[STRLEN("\x1B]11;rgb:0/0/0\x07")]; /* shortest possible reply */
         size_t buf_full = 0;
         BackgroundColorContext context = {};