History log of /curl/lib/multi.c (Results 176 – 200 of 761)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a268ad5d 17-Mar-2020 Jay Satiro

multi: Improve parameter check for curl_multi_remove_handle

- If an easy handle is owned by a multi different from the one specified
then return CURLM_BAD_EASY_HANDLE.

Prior t

multi: Improve parameter check for curl_multi_remove_handle

- If an easy handle is owned by a multi different from the one specified
then return CURLM_BAD_EASY_HANDLE.

Prior to this change I assume user error could cause corruption.

Closes https://github.com/curl/curl/pull/5116

show more ...


# 2258b7bc 06-Mar-2020 Jay Satiro

multi: skip EINTR check on wakeup socket if it was closed

- Don't check errno on wakeup socket if sread returned 0 since sread
doesn't set errno in that case.

This is a follow

multi: skip EINTR check on wakeup socket if it was closed

- Don't check errno on wakeup socket if sread returned 0 since sread
doesn't set errno in that case.

This is a follow-up to cf7760a from several days ago which fixed
Curl_multi_wait to stop busy looping sread on the non-blocking wakeup
socket if it was closed (ie sread returns 0). Due to a logic error it
was still possible to busy loop in that case if errno == EINTR.

Closes https://github.com/curl/curl/pull/5047

show more ...


# cf7760ab 02-Mar-2020 Daniel Stenberg

multi_wait: stop loop when sread() returns zero

It's unclear why it would ever return zero here, but this change fixes
Robert's problem and it shouldn't loop forever...

Reported

multi_wait: stop loop when sread() returns zero

It's unclear why it would ever return zero here, but this change fixes
Robert's problem and it shouldn't loop forever...

Reported-by: Robert Dunaj
Bug: https://curl.haxx.se/mail/archive-2020-02/0011.html
Closes #5019

show more ...


# 4a4b63da 14-Feb-2020 Daniel Stenberg

socks: make the connect phase non-blocking

Removes two entries from KNOWN_BUGS.

Closes #4907


# d60b1b37 14-Feb-2020 Daniel Stenberg

multi: if Curl_readwrite sets 'comeback' use expire, not loop

Otherwise, a very fast single transfer ricks starving out other
concurrent transfers.

Closes #4927


# 4d1aa8d4 09-Feb-2020 Jay Satiro

multi: fix outdated comment

- Do not say that conn->data is "cleared" by multi_done().

If the connection is in use then multi_done assigns another easy handle
still using the co

multi: fix outdated comment

- Do not say that conn->data is "cleared" by multi_done().

If the connection is in use then multi_done assigns another easy handle
still using the connection to conn->data, therefore in that case it is
not cleared.

Closes https://github.com/curl/curl/pull/4901

show more ...


# db9af346 27-Jan-2020 Daniel Stenberg

multi_done: if multiplexed, make conn->data point to another transfer

... since the current transfer is being killed. Setting to NULL is
wrong, leaving it pointing to 'data' is wrong sin

multi_done: if multiplexed, make conn->data point to another transfer

... since the current transfer is being killed. Setting to NULL is
wrong, leaving it pointing to 'data' is wrong since that handle might be
about to get freed.

Fixes #4845
Closes #4858
Reported-by: dmitrmax on github

show more ...


# 0b030a5b 26-Jan-2020 Daniel Stenberg

global_init: move the IPv6 works status bool to multi handle

Previously it was stored in a global state which contributed to
curl_global_init's thread unsafety. This boolean is now inste

global_init: move the IPv6 works status bool to multi handle

Previously it was stored in a global state which contributed to
curl_global_init's thread unsafety. This boolean is now instead figured
out in curl_multi_init() and stored in the multi handle. Less effective,
but thread safe.

Closes #4851

show more ...


# 96075328 05-Jan-2020 Daniel Stenberg

ConnectionExists: respect the max_concurrent_streams limits

A regression made the code use 'multiplexed' as a boolean instead of the
counter it is intended to be. This made curl try to "

ConnectionExists: respect the max_concurrent_streams limits

A regression made the code use 'multiplexed' as a boolean instead of the
counter it is intended to be. This made curl try to "over-populate"
connections with new streams.

This regression came with 41fcdf71a1, shipped in curl 7.65.0.

Also, respect the CURLMOPT_MAX_CONCURRENT_STREAMS value in the same
check.

Reported-by: Kunal Ekawde
Fixes #4779
Closes #4784

show more ...


# 29babeaf 12-Jan-2020 Daniel Stenberg

misc: Copyright year out of date, should be 2020

Follow-up to recent commits

[skip ci]


# b700662b 28-Dec-2019 Jay Satiro

multi: Change curl_multi_wait/poll to error on negative timeout

- Add new error CURLM_BAD_FUNCTION_ARGUMENT and return that error when
curl_multi_wait/poll is passed timeout param < 0.

multi: Change curl_multi_wait/poll to error on negative timeout

- Add new error CURLM_BAD_FUNCTION_ARGUMENT and return that error when
curl_multi_wait/poll is passed timeout param < 0.

Prior to this change passing a negative value to curl_multi_wait/poll
such as -1 could cause the function to wait forever.

Reported-by: hamstergene@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/4763

Closes https://github.com/curl/curl/pull/4765

show more ...


# 060fb84a 24-Dec-2019 Xiang Xiao

lib: remove erroneous +x file permission on some c files

Modified by commit eb9a604 accidentally.

Closes https://github.com/curl/curl/pull/4756


# 29ca9fc5 13-Dec-2019 Daniel Stenberg

multi: free sockhash on OOM

This would otherwise leak memory in the error path.

Detected by torture test 1540.

Closes #4713


# c7bc689f 09-Dec-2019 Daniel Stenberg

conn: always set bits.close with connclose()

Closes #4690


# ee263de7 09-Dec-2019 Daniel Stenberg

conncache: fix multi-thread use of shared connection cache

It could accidentally let the connection get used by more than one
thread, leading to double-free and more.

Reported-b

conncache: fix multi-thread use of shared connection cache

It could accidentally let the connection get used by more than one
thread, leading to double-free and more.

Reported-by: Christopher Reid
Fixes #4544
Closes #4557

show more ...


# f3c35e37 17-Nov-2019 Gergely Nagy

multi: add curl_multi_wakeup()

This commit adds curl_multi_wakeup() which was previously in the TODO
list under the curl_multi_unblock name.

On some platforms and with some conf

multi: add curl_multi_wakeup()

This commit adds curl_multi_wakeup() which was previously in the TODO
list under the curl_multi_unblock name.

On some platforms and with some configurations this feature might not be
available or can fail, in these cases a new error code
(CURLM_WAKEUP_FAILURE) is returned from curl_multi_wakeup().

Fixes #4418
Closes #4608

show more ...


# d1476aa1 17-Nov-2019 Gergely Nagy

multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds

Prior to this change:

The check if an extra wait is necessary was based not on the
number of extra fds but on the p

multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds

Prior to this change:

The check if an extra wait is necessary was based not on the
number of extra fds but on the pointer.

If a non-null pointer was given in extra_fds, but extra_nfds
was zero, then the wait was skipped even though poll was not
called.

Closes https://github.com/curl/curl/pull/4610

show more ...


# 4e1eee15 14-Nov-2019 Daniel Stenberg

multi_poll: avoid busy-loop when called without easy handles attached

Fixes #4594
Closes #4595
Reported-by: 3dyd on github


# 13182b33 10-Nov-2019 Daniel Stenberg

remove_handle: clear expire timers after multi_done()

Since 59041f0, a new timer might be set in multi_done() so the clearing
of the timers need to happen afterwards!

Reported-b

remove_handle: clear expire timers after multi_done()

Since 59041f0, a new timer might be set in multi_done() so the clearing
of the timers need to happen afterwards!

Reported-by: Max Kellermann
Fixes #4575
Closes #4583

show more ...


# c124e6b3 24-Sep-2019 Kunal Ekawde

CURLMOPT_MAX_CONCURRENT_STREAMS: new setopt

Closes #4410


# 07c1af92 19-Sep-2019 Daniel Stenberg

multi: value '2L' is assigned to a boolean

Fixes warning detected by PVS-Studio
Fixes #4374


# 5050edb1 02-Sep-2019 Daniel Stenberg

cleanup: move functions out of url.c and make them static

Closes #4289


# 437bf10c 13-Aug-2019 Daniel Stenberg

multi: getsock improvements for QUIC connecting


# 02346abc 29-Jul-2019 Daniel Stenberg

curl_multi_poll: a sister to curl_multi_wait() that waits more

Repeatedly we see problems where using curl_multi_wait() is difficult or
just awkward because if it has no file descriptor

curl_multi_poll: a sister to curl_multi_wait() that waits more

Repeatedly we see problems where using curl_multi_wait() is difficult or
just awkward because if it has no file descriptor to wait for
internally, it returns immediately and leaves it to the caller to wait
for a small amount of time in order to avoid occasional busy-looping.

This is often missed or misunderstood, leading to underperforming
applications.

This change introduces curl_multi_poll() as a replacement drop-in
function that accepts the exact same set of arguments. This function
works identically to curl_multi_wait() - EXCEPT - for the case when
there's nothing to wait for internally, as then this function will by
itself wait for a "suitable" short time before it returns. This
effectiely avoids all risks of busy-looping and should also make it less
likely that apps "over-wait".

This also changes the curl tool to use this funtion internally when
doing parallel transfers and changes curl_easy_perform() to use it
internally.

Closes #4163

show more ...


# b1616dad 31-Jul-2019 Daniel Stenberg

timediff: make it 64 bit (if possible) even with 32 bit time_t

... to make it hold microseconds too.

Fixes #4165
Closes #4168


12345678910>>...31