io-util: actually retry on failure
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Nov 2023 18:54:31 +0000 (03:54 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 22 Nov 2023 20:38:38 +0000 (20:38 +0000)
Follow-up for e22c60a9d5dfc5f0b260c7906f3546aef2925998.

Fixes #30152.

src/basic/io-util.c

index dee5994..6bcbef3 100644 (file)
@@ -163,6 +163,7 @@ int loop_write_full(int fd, const void *buf, size_t nbytes, usec_t timeout) {
                                 return r;
                         if (r == 0)
                                 return -ETIME;
+                        continue;
                 }
 
                 if (_unlikely_(nbytes > 0 && k == 0)) /* Can't really happen */