1
0
mirror of https://github.com/apple/swift-nio-extras.git synced 2025-05-19 03:38:56 +08:00

4 Commits

Author SHA1 Message Date
George Barnett
e5b5d191a8
Forward 'channelInactive' in the RequestResponseHandler ()
Motivation:

As a rule of thumb we should always forward channel events to the next
handler.  added an implementation for `channelInactive` but forgot
to forward it.

Modifications:

- forward `channelInactive` in the `RequestResponseHandler`

Result:

Handlers after the `RequestResponseHandler` will recieve
`channelInactive`.
2020-08-24 13:11:47 +01:00
George Barnett
a8e195bdf8
Fail outstanding promises in channelInactive in the RequestResponseHandler ()
Motivation:

It's possible for channels to be closed without an error; and the
`RequestResponseHandler` should tolerate that by failing any promises
for which it does not have a response for.

Modifications:

- Add `ClosedBeforeReceivingResponseError`
- Fail outstanding promises with `ClosedBeforeReceivingResponseError` in
  `RequestResponseHandler.channelInactive`
- Add a test.

Result:

Outstanding request promises are failed when the channel becomes inactive.
2020-08-24 07:35:13 +01:00
Johannes Weiss
7b7fcf09be port to NIO 2 ()
Motivation:

NIO 2 is the new hot stuff.

Modifications:

port to NIO 2

Result:

newer, shinier
2019-02-26 13:01:48 +00:00
Johannes Weiss
0dbd54199d
add RequestResponseHandler ()
Motivation:

Frequently, people want to terminate their pipeline with a handler that
takes in requests & a promise and on receipt of the response just
fulfill that promise.

Modifications:

- add `RequestResponseHandler`
- remove outdated of contents from README.md

Result:

more useful handlers
2019-01-29 15:30:24 +00:00