Commit d73d862
authored
After the changes introduced in
apple/swift-nio-http2#487, we need to make a
small change in the implementation of `NIOAsyncChannel` to wait on the
`closeFuture` instead of on `close`'s promise in the `executeThenClose`
implementation.
### Motivation:
`executeThenClose` shouldn't fail from errors arising from closing the
channel - at this point, the user of the channel cannot really do
anything, and since the channel has been closed, we should not fail
since resources have been cleaned up anyways.
### Modifications:
This PR changes the implementation of `NIOAsyncChannel` to wait on the
`closeFuture` instead of on `close`'s promise in the `executeThenClose`
implementation.
It also updates the docs for `closeFuture` to better explain when it
will be succeeded and why it won't ever be failed.
### Result:
`executeThenClose` won't throw errors upon closing.
1 parent 6008911 commit d73d862
File tree
2 files changed
+22
-6
lines changed- Sources/NIOCore
- AsyncChannel
2 files changed
+22
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
304 | 311 | | |
305 | | - | |
306 | | - | |
| 312 | + | |
307 | 313 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
312 | 321 | | |
| 322 | + | |
313 | 323 | | |
314 | 324 | | |
315 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
| |||
0 commit comments