Skip to content

Commit

Permalink
fixup! Fixing Issues with Async Upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Jun 23, 2024
1 parent d7864bf commit 236c14b
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,17 @@ extension MultipartFramesToRawPartsSequence {
switch stateMachine.nextFromPartSequence() {
case .returnNil: return nil
case .fetchFrame:
let frame : Upstream.AsyncIterator.Element?
let frame: Upstream.AsyncIterator.Element?
var upstream = upstream
if #available(macOS 15, iOS 18.0, tvOS 18.0, watchOS 11.0, macCatalyst 18.0, visionOS 2.0, *) {
#if compiler(>=6.0)
frame = try await upstream.next(isolation: self)
#else
frame = try await upstream.next()
#endif
} else {
frame = try await upstream.next()
}
if #available(macOS 15, iOS 18.0, tvOS 18.0, watchOS 11.0, macCatalyst 18.0, visionOS 2.0, *) {
#if compiler(>=6.0)
frame = try await upstream.next(isolation: self)
#else
frame = try await upstream.next()
#endif
} else {
frame = try await upstream.next()
}
self.upstream = upstream
switch stateMachine.partReceivedFrame(frame) {
case .returnNil: return nil
Expand All @@ -374,17 +374,17 @@ extension MultipartFramesToRawPartsSequence {
switch stateMachine.nextFromBodySubsequence() {
case .returnNil: return nil
case .fetchFrame:
let frame : Upstream.AsyncIterator.Element?
let frame: Upstream.AsyncIterator.Element?
var upstream = upstream
if #available(macOS 15, iOS 18.0, tvOS 18.0, watchOS 11.0, macCatalyst 18.0, visionOS 2.0, *) {
#if compiler(>=6.0)
frame = try await upstream.next(isolation: self)
#else
frame = try await upstream.next()
#endif
} else {
frame = try await upstream.next()
}
if #available(macOS 15, iOS 18.0, tvOS 18.0, watchOS 11.0, macCatalyst 18.0, visionOS 2.0, *) {
#if compiler(>=6.0)
frame = try await upstream.next(isolation: self)
#else
frame = try await upstream.next()
#endif
} else {
frame = try await upstream.next()
}
self.upstream = upstream
switch stateMachine.bodyReceivedFrame(frame) {
case .returnNil: return nil
Expand Down

0 comments on commit 236c14b

Please sign in to comment.