File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,8 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
330330 try channel. pipeline. syncOperations. addHTTPClientHandlers ( )
331331 // Lambda quotas... An invocation payload is maximal 6MB in size:
332332 // https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
333+ // TODO: should we enforce this here ? What about streaming functions that
334+ // support up to 20Mb responses ?
333335 try channel. pipeline. syncOperations. addHandler (
334336 NIOHTTPClientResponseAggregator ( maxContentLength: 6 * 1024 * 1024 )
335337 )
@@ -364,6 +366,14 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
364366 channel. closeFuture. whenComplete { result in
365367 self . assumeIsolated { runtimeClient in
366368 runtimeClient. channelClosed ( channel)
369+
370+ // at this stage, we lost the connection to the Lambda Service,
371+ // this is very unlikely to happen when running in a lambda function deployed in the cloud
372+ // however, this happens when performance testing against the MockServer
373+ // shutdown this runtime.
374+ // The Lambda service will create a new runtime environment anyway
375+ runtimeClient. logger. trace ( " Connection to Lambda API lost, exiting " )
376+ exit ( - 1 )
367377 }
368378 }
369379
You can’t perform that action at this time.
0 commit comments