Closed Cartisim closed 10 months ago
Done ✅, Hopefully the test is sufficient. Thanks a bunch!
@Lukasa I am happy to do what I can to push this one through. Thanks for your work.
Can you bring your branch up-to-date with main?
@Lukasa ✅ Thanks again for your hard work!
@swift-server-bot test this please
Fire the pipelines error caught method when NWConnection's state changes to failed
There seems to need to be a method fired when NSConnection's state changes to failed in order to notify other handlers in the pipeline.
Motivation:
When NWConnection fails the connection due to a number of reasons, one being that the clients devices loses internet and we want to receive the failed error in order to handle the applications behavior when the internet is lost. We need to fire the
errorCaught
method in order to notify handler's in the pipeline.Modifications:
On line 277 of the file StateManagedNWConnectionChannel.swift I added the line of code to forward the error, namely...
self.pipeline.fireErrorCaught(error)
Result:
Our Handlers can now receive the error and handle the socket error state accordingly.