diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb39e62..d9068ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: name: macOS runs-on: firebreak env: - DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer timeout-minutes: 10 steps: - uses: actions/checkout@v3 @@ -35,7 +35,7 @@ jobs: name: Linux runs-on: ubuntu-22.04 container: - image: swiftlang/swift:nightly-5.8-jammy + image: swift:5.8.1-jammy timeout-minutes: 10 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f189e7..b7e291a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: name: Upload Release Artifact runs-on: firebreak env: - DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Package.resolved b/Package.resolved index e8fced8..a1c2254 100644 --- a/Package.resolved +++ b/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vapor/async-kit.git", "state" : { - "revision" : "a61da00d404ec91d12766f1b9aac7d90777b484d", - "version" : "1.17.0" + "revision" : "eab9edff78e8ace20bd7cb6e792ab46d54f59ab9", + "version" : "1.18.0" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vapor/routing-kit.git", "state" : { - "revision" : "611bc45c5dfb1f54b84d99b89d1f72191fb6b71b", - "version" : "4.7.2" + "revision" : "e0539da5b60a60d7381f44cdcf04036f456cee2f", + "version" : "4.8.0" } }, { @@ -86,8 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-crypto.git", "state" : { - "revision" : "33a20e650c33f6d72d822d558333f2085effa3dc", - "version" : "2.5.0" + "revision" : "60f13f60c4d093691934dc6cfdf5f508ada1f894", + "version" : "2.6.0" } }, { @@ -95,8 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "32e8d724467f8fe623624570367e3d50c5638e46", - "version" : "1.5.2" + "revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed", + "version" : "1.5.3" } }, { @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio.git", "state" : { - "revision" : "a2e487b77f17edbce9a65f2b7415f2f479dc8e48", - "version" : "2.57.0" + "revision" : "cf281631ff10ec6111f2761052aa81896a83a007", + "version" : "2.58.0" } }, { @@ -140,8 +140,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-ssl.git", "state" : { - "revision" : "e866a626e105042a6a72a870c88b4c531ba05f83", - "version" : "2.24.0" + "revision" : "320bd978cceb8e88c125dcbb774943a92f6286e9", + "version" : "2.25.0" } }, { @@ -149,8 +149,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-transport-services.git", "state" : { - "revision" : "41f4098903878418537020075a4d8a6e20a0b182", - "version" : "1.17.0" + "revision" : "e7403c35ca6bb539a7ca353b91cc2d8ec0362d58", + "version" : "1.19.0" } }, { @@ -167,8 +167,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vapor/vapor.git", "state" : { - "revision" : "6b96684e150d3b3afcd53df12fe66e6bd9b67a04", - "version" : "4.78.0" + "revision" : "1bb4a2ed94bec7a92f92e82896408c785d068f5c", + "version" : "4.79.0" } }, { diff --git a/Sources/Data.swift b/Sources/Data.swift index 1820ee6..7ff7e31 100644 --- a/Sources/Data.swift +++ b/Sources/Data.swift @@ -82,7 +82,7 @@ func createDataRoutes(for app: Application) throws { let response = Response(body: .init(stream: { writer in var bytesToSend = count - request.eventLoop.scheduleRepeatedTask(initialDelay: .seconds(0), delay: .milliseconds(1)) { task in + request.eventLoop.scheduleRepeatedTask(initialDelay: .seconds(0), delay: .milliseconds(20)) { task in guard bytesToSend > 0 else { task.cancel(); _ = writer.write(.end); return } _ = writer.write(.buffer(.init(integer: UInt8(bytesToSend)))) @@ -104,7 +104,7 @@ func createDataRoutes(for app: Application) throws { let encodedReply = try encoder.encodeAsByteBuffer(reply, allocator: app.allocator) let response = Response(body: .init(stream: { writer in var payloadsToSend = count - request.eventLoop.scheduleRepeatedTask(initialDelay: .seconds(0), delay: .milliseconds(1)) { task in + request.eventLoop.scheduleRepeatedTask(initialDelay: .seconds(0), delay: .milliseconds(20)) { task in guard payloadsToSend > 0 else { task.cancel(); _ = writer.write(.end); return } _ = writer.write(.buffer(encodedReply))