multi: fix multi_wait() timeout handling

- determine the actual poll timeout *after* all sockets
  have been collected. Protocols and connection filters may
  install new timeouts during collection.
- add debug logging to test1533 where the mistake was noticed

Reported-by: Matt Jolly
Fixes #13782
Closes #13825
This commit is contained in:
Stefan Eissing 2024-05-29 17:13:34 +02:00 committed by Daniel Stenberg
parent 3b9569c3e2
commit c8096668ae
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 16 additions and 8 deletions

View file

@ -487,7 +487,7 @@ lib1551_SOURCES = lib1551.c $(SUPPORTFILES)
lib1552_SOURCES = lib1552.c $(SUPPORTFILES) $(TESTUTIL)
lib1552_LDADD = $(TESTUTIL_LIBS)
lib1553_SOURCES = lib1553.c $(SUPPORTFILES) $(TESTUTIL)
lib1553_SOURCES = lib1553.c $(SUPPORTFILES) $(TSTTRACE) $(TESTUTIL)
lib1553_LDADD = $(TESTUTIL_LIBS)
lib1554_SOURCES = lib1554.c $(SUPPORTFILES)

View file

@ -24,6 +24,7 @@
#include "test.h"
#include "testutil.h"
#include "testtrace.h"
#include "warnless.h"
#include "memdebug.h"
@ -74,6 +75,12 @@ CURLcode test(char *URL)
easy_setopt(curls, CURLOPT_XFERINFOFUNCTION, xferinfo);
easy_setopt(curls, CURLOPT_NOPROGRESS, 1L);
libtest_debug_config.nohex = 1;
libtest_debug_config.tracetime = 1;
test_setopt(curls, CURLOPT_DEBUGDATA, &libtest_debug_config);
easy_setopt(curls, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
easy_setopt(curls, CURLOPT_VERBOSE, 1L);
multi_add_handle(multi, curls);
multi_perform(multi, &still_running);