Commit ef380ee
committed
BaseStreamSocketChannel half-close allows outstanding writes to complete
Motivation:
At the moment half-closes are actioned immediately and fails all outstanding writes.
We should refuse new writes but allow these writes to complete before
completing the close.
Modifications:
Modify the PendingWritesManager internal buffer to hold an enum of
either writes or close events. We use this to store the close and only
action it when the preceding writes have been handled.
Result:
Outbound close should no longer fail outstanding writes1 parent dc06cf8 commit ef380ee
File tree
4 files changed
+276
-100
lines changed- Sources/NIOPosix
- Tests/NIOPosixTests
4 files changed
+276
-100
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | 197 | | |
201 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
202 | 210 | | |
203 | 211 | | |
204 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | | - | |
| 309 | + | |
| 310 | + | |
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
| |||
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
325 | | - | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
565 | 568 | | |
566 | 569 | | |
567 | 570 | | |
568 | | - | |
| 571 | + | |
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
| |||
0 commit comments