Skip to content

Commit 9dcb4b3

Browse files
committed
fix a case where continuation was resumed twice
1 parent 008c542 commit 9dcb4b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/AWSLambdaRuntime/LambdaRuntimeClient.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ extension LambdaChannelHandler: ChannelInboundHandler {
937937
// fail any pending responses with last error or assume peer disconnected
938938
switch self.state {
939939
case .connected(_, .waitingForNextInvocation(let continuation)):
940+
self.state = .disconnected
940941
continuation.resume(throwing: self.lastError ?? ChannelError.ioOnClosedChannel)
941942
default:
942943
break

0 commit comments

Comments
 (0)