@@ -72,7 +72,7 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
72
72
case lostConnection
73
73
case connecting( [ ConnectionContinuation ] )
74
74
case connected( Channel , LambdaChannelHandler < LambdaRuntimeClient > )
75
-
75
+
76
76
static func == ( lhs: ConnectionState , rhs: ConnectionState ) -> Bool {
77
77
switch ( lhs, rhs) {
78
78
case ( . disconnected, . disconnected) :
@@ -171,7 +171,7 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
171
171
172
172
case . connected( let channel, _) :
173
173
channel. close ( mode: . all, promise: nil )
174
-
174
+
175
175
case . lostConnection:
176
176
continuation. resume ( )
177
177
}
@@ -191,7 +191,7 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
191
191
self . lambdaState = . waitingForNextInvocation
192
192
let handler = try await self . makeOrGetConnection ( )
193
193
let invocation = try await handler. nextInvocation ( )
194
-
194
+
195
195
guard case . waitingForNextInvocation = self . lambdaState else {
196
196
fatalError ( " Invalid state: \( self . lambdaState) " )
197
197
}
@@ -320,7 +320,6 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
320
320
case ( . connected, . notClosing) :
321
321
self . connectionState = . disconnected
322
322
323
-
324
323
case ( . connected, . closing( let continuation) ) :
325
324
self . connectionState = . disconnected
326
325
@@ -394,8 +393,8 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
394
393
self . assumeIsolated { runtimeClient in
395
394
396
395
// resume any pending continuation on the handler
397
- if case . connected( _ , let handler) = runtimeClient. connectionState {
398
- if case . connected( _ , let lambdaState) = handler. state {
396
+ if case . connected( _, let handler) = runtimeClient. connectionState {
397
+ if case . connected( _, let lambdaState) = handler. state {
399
398
if case . waitingForNextInvocation( let continuation) = lambdaState {
400
399
continuation. resume ( throwing: LambdaRuntimeError ( code: . connectionToControlPlaneLost) )
401
400
}
0 commit comments