mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
efc4cd16bf
This PR implements a mechanism to propagate connection loss information from the Lambda runtime client to the runtime loop, enabling termination without backtrace when the connection to the Lambda control plane (or a Mock Server) is lost. The changes are: - When the connection is lost, `ChannelHandlerDelegate.channelInnactive()` now correctly calls `resume(throwing:)` on the ending continuation, for all states (`.waitingForNextInvocation ` and `.sentResponse`). This eliminates the hangs on connection lost.. - I added top-level error handling on `LambdaRuntime._run()` - Add a unit test to check that either `LambdaruntimeError.connectionToControlPlaneLost`, a `ChannelError`, or an `IOError` is thrown when the server closes the connection