Skip to content

Commit 707f380

Browse files
committed
add a logging statement in case of error
1 parent b06e0df commit 707f380

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/AWSLambdaRuntime/Lambda+LocalServer.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ internal struct LambdaHTTPServer {
224224
}
225225

226226
logger.info("Server shutting down")
227-
return result // ignore errors here, we are shutting down anyway
227+
if case .failure(let error) = result {
228+
logger.error("Error during server shutdown: \(error)")
229+
}
230+
return result
228231
}
229232

230233
/// This method handles individual TCP connections

0 commit comments

Comments
 (0)