Skip to content

Commit fd7d232

Browse files
committed
Makes performance script run on macOS
1 parent 1b3c81c commit fd7d232

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Sources/AWSLambdaRuntime/LambdaRuntime.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,15 @@ public final class LambdaRuntime<Handler>: Sendable where Handler: StreamingLamb
104104
} catch {
105105
// catch top level errors that have not been handled until now
106106
// this avoids the runtime to crash and generate a backtrace
107-
self.logger.error("LambdaRuntime.run() failed with error", metadata: ["error": "\(error)"])
108107
if let error = error as? LambdaRuntimeError,
109108
error.code != .connectionToControlPlaneLost
110109
{
111110
// if the error is a LambdaRuntimeError but not a connection error,
112111
// we rethrow it to preserve existing behaviour
112+
self.logger.error("LambdaRuntime.run() failed with error", metadata: ["error": "\(error)"])
113113
throw error
114+
} else {
115+
self.logger.trace("LambdaRuntime.run() connection lost")
114116
}
115117
}
116118

scripts/performance_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ error() { printf -- "** ERROR: %s\n" "$*" >&2; }
1919
fatal() { error "$@"; exit 1; }
2020

2121
export HOST=127.0.0.1
22-
export PORT=7000
22+
export PORT=7777
2323
export AWS_LAMBDA_RUNTIME_API="$HOST:$PORT"
2424
export LOG_LEVEL=error # important, otherwise log becomes a bottleneck
2525

0 commit comments

Comments
 (0)