[Bug 5426] wget hangs in call to poll() if progress meter or timeout support is enabled and HTTP chunked encoding is used

bugzilla at busybox.net bugzilla at busybox.net
Thu Aug 16 14:11:41 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5426

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> 2012-08-16 14:11:41 UTC ---
Please try this easy fix:

                        while (1) {
                                if (safe_poll(&polldata, 1, 1000) != 0)
                                        break; /* error, EOF, or data is
available */
# if ENABLE_FEATURE_WGET_TIMEOUT
                                if (second_cnt != 0 && --second_cnt == 0) {
                                        progress_meter(PROGRESS_END);
                                        bb_error_msg_and_die("download timed
out");
                                }
# endif
                                /* Needed for "stalled" indicator */
                                progress_meter(PROGRESS_BUMP);
 ADD THIS ==============>       break;
                        }

Basically, this makes us try reading once a second, even if poll says there is
no data.

I think this should work. Please let me know whether it indeed does.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list