missing attachment: hanging in select() and using libwww from multithreaded apps
"Kenneth B. Haase" <[email protected]>
| Newsgroups | gmane.comp.lib.libwww |
|---|---|
| Message-ID | <1021035718.2407.114.camel@buster> |
Here it is. Sorry about that. -- Ken Haase [email protected] beingmeta, inc. www.beingmeta.com
w3c-libwww-5.3.2.diff
(text/x-patch, 844 B)
diff -u -r w3c-libwww-5.3.2/Library/src/HTEvtLst.c w3c-libwww-5.3.2-kh/Library/src/HTEvtLst.c
--- w3c-libwww-5.3.2/Library/src/HTEvtLst.c Wed Aug 2 06:38:07 2000
+++ w3c-libwww-5.3.2-kh/Library/src/HTEvtLst.c Tue Jan 8 16:50:03 2002
@@ -673,13 +673,14 @@
wt = NULL;
if ((status = HTTimer_next(&timeout)))
break;
- if (timeout != 0) {
+ if (timeout <= 0) {
+ HTTRACE(THD_TRACE, "Event Loop.. non-positive timeout, picking 1 second\n");
+ waittime.tv_sec = 1; waittime.tv_usec = 0; wt = &waittime;}
+ else {
waittime.tv_sec = timeout / MILLI_PER_SECOND;
waittime.tv_usec = (timeout % MILLI_PER_SECOND) *
(1000000 / MILLI_PER_SECOND);
- wt = &waittime;
- }
-
+ wt = &waittime;}
/*
** Check whether we still have to continue the event loop. It could
** be that one of the timer handlers ended the loop.