This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit 58178ce
committed
HttpClient xplat: Fix bugs in polling and callback logic
- On OSX, the read end of the pipe sometimes wakes up the poll
with a POLLOUT. Since we are interested in only reading on it,
scoping down to POLLIN prevents this from happening. Else we
attempt a read on it which fails
- CheckForCompletedTransfers was being unnecessarily called from the
socket callback. We are only interested in MSG_DONE after the socket
callback indicates removal. This will anyway wake up PollFunction which
calls CheckForCompletedTransfers. This race is also causing a seg fault
sometimes because curl_multi_socket_action has been called on an fd
that was getting cleaned up via curl_easy_cleanup (call sequence is
CurlSocketCallback --> CheckForCompletedTransfers --> EndRequest)
- Also removed some unnecessary CharSet attributes
cc: @stephentoub @davidsh @CIPop @SidharthNabar @pgavlin1 parent 563f5de commit 58178ce
File tree
3 files changed
+5
-7
lines changed- src
- Common/src/Interop/Unix/libcurl
- System.Net.Http/src/System/Net/Http/Unix
3 files changed
+5
-7
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
| |||
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | 374 | | |
377 | 375 | | |
378 | 376 | | |
| |||
0 commit comments