You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop wrap-future's "success" treatment of ClosedChannelException
Treating channel closes as successful in the deferred returned by
`wrap-future` is a bit of a footgun. For example, when used on an
`SSLHandler#handshakeFuture`, one would not just have to listen for
the operation to succeed but *also* check that the value returned from
the deferred isn't `false`. Instead, we now propagate
`ClosedChannelException` as an error just like any other to make the
API a bit less surprising. This allows us to remove said check from
the handshake future again.
Further note that other existing uses of `wrap-future` where this
could happen wrap the operation in a `.closeFuture` anyway which makes
this special-case unnecessary to begin with.
Also included is a test for showing that putting to a closed channel
sink still returns a successful deferred with a `false` value as per
`manifold.stream`'s API convention.
0 commit comments