Skip to content

Commit 8c619d9

Browse files
committed
add comment about workaround for a bug
1 parent caf29b4 commit 8c619d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/OpenAPIVapor/VaporTransport.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ extension Vapor.Response.Body {
145145
self = .empty
146146
return
147147
}
148+
/// Used to guard the body from being iterated multiple times.
149+
/// https://github.com/vapor/vapor/issues/3002
148150
let iterated = ManagedAtomic(false)
149151
let stream: @Sendable (any Vapor.BodyStreamWriter) -> () = { writer in
150152
guard iterated.compareExchange(

0 commit comments

Comments
 (0)