Skip to content

Commit

Permalink
Remove backported URLSession method when not required
Browse files Browse the repository at this point in the history
  • Loading branch information
swhitty committed Oct 30, 2024
1 parent 0482ba5 commit de184b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:

linux_swift_6_0_musl:
runs-on: ubuntu-latest
container: swift:6.0
container: swift:6.0.2
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -113,7 +113,7 @@ jobs:
- name: SDK List Pre
run: swift sdk list
- name: Install SDK
run: swift sdk install https://download.swift.org/swift-6.0.1-release/static-sdk/swift-6.0.1-RELEASE/swift-6.0.1-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum d4f46ba40e11e697387468e18987ee622908bc350310d8af54eb5e17c2ff5481
run: swift sdk install https://download.swift.org/swift-6.0.2-release/static-sdk/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum aa5515476a403797223fc2aad4ca0c3bf83995d5427fb297cab1d93c68cee075
- name: SDK List Post
run: swift sdk list
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions FlyingFox/Sources/URLSession+Async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
import Foundation
import FlyingSocks

#if canImport(FoundationNetworking)
#if compiler(<6) && canImport(FoundationNetworking)
import FoundationNetworking

extension URLSession {

// Ports macOS Foundation method to Linux
// Ports macOS Foundation method to earlier Linux versions
func data(for request: URLRequest) async throws -> (Data, URLResponse) {
let state = Mutex((isCancelled: false, task: URLSessionDataTask?.none))
return try await withTaskCancellationHandler {
Expand Down

0 comments on commit de184b0

Please sign in to comment.