]> mj.ucw.cz Git - arexx.git/commitdiff
Bugfix: Initial download slept too much
authorMartin Mares <mj@ucw.cz>
Thu, 29 Dec 2011 08:42:55 +0000 (09:42 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 29 Dec 2011 08:42:55 +0000 (09:42 +0100)
arexxd.c

index faedc5eb09a96b4527905398ee3dc09dc37d575b..c93ec57cd14e2d1cc8a3b8e6e5008c5a9662392e 100644 (file)
--- a/arexxd.c
+++ b/arexxd.c
@@ -563,9 +563,11 @@ int main(int argc, char **argv)
                        want_sleep = 1;
                        if (err > 0 && parse_packet(reply))
                                want_sleep = 0;
                        want_sleep = 1;
                        if (err > 0 && parse_packet(reply))
                                want_sleep = 0;
-                       want_stats = 1;
                        sigprocmask(SIG_UNBLOCK, &term_sigs, NULL);
                        sigprocmask(SIG_UNBLOCK, &term_sigs, NULL);
-                       sleep(4);
+                       if (want_sleep) {
+                               sleep(4);
+                               want_stats = 1;
+                       }
                        sigprocmask(SIG_BLOCK, &term_sigs, NULL);
                }
 
                        sigprocmask(SIG_BLOCK, &term_sigs, NULL);
                }