swift-nio-transport-services/Sources
Cory Benfield ea5ba9bd25 Don't transition to .registered unless registration succeeds. (#19)
Motivation:

In some cases, such as when an event loop has been shutdown, channel
registration may fail. In these cases, we would incorrectly attempt to
deregister the channel, which would fail (and in debug builds, assert).
Really, we shouldn't transition into .registered until we know that we have,
in fact, registered.

However, we need to be cautious: we don't want to register unless we
believe we're in an acceptable state to register.

Modifications:

Updated the state enum to perform the registration at the correct
part of the state change function.

Result:

Harder to crash in debug mode
2019-01-08 21:40:57 +00:00
..
NIOTSHTTPClient Initial commit 2018-07-18 17:11:24 +01:00
NIOTSHTTPServer Initial commit 2018-07-18 17:11:24 +01:00
NIOTransportServices Don't transition to .registered unless registration succeeds. (#19) 2019-01-08 21:40:57 +00:00