]> git.ipfire.org Git - thirdparty/curl.git/commit
connect: fix connection shutdown for event based processing
authorStefan Eissing <stefan@eissing.org>
Mon, 29 Jul 2024 08:23:20 +0000 (10:23 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Jul 2024 12:53:43 +0000 (14:53 +0200)
commit17e6f06ea37136c36d2712b3433ef0d3b118ec0d
treedb1d0d2f551857e40e817715f0058bba57da7d71
parent14f630ecf6e1ec433473c19a91fd1f3e2ed5d85e
connect: fix connection shutdown for event based processing

connections being shutdown would register sockets for events, but then
never remove these sockets again. Nor would the shutdown effectively
been performed.

- If a socket event involves a transfer, check if that is the
  connection cache internal handle and run its multi_perform()
  instead (the internal handle is used for all shutdowns).
- When a timer triggers for a transfer, check also if it is
  about the connection cache internal handle.
- During processing shutdowns in the connection cache, assess
  the shutdown timeouts. Register a Curl_expire() of the lowest
  value for the cache's internal handle.

Reported-by: Gordon Parke
Fixes #14280
Closes #14296
lib/conncache.c
lib/connect.c
lib/connect.h
lib/easy.c
lib/multi.c
lib/sigpipe.h