mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-15 01:18:58 +08:00
Update ResponsivenessConfig.swift
We use 8*10^9 in NIOHTTPResponsiveness however this number will overrun the integer size on platforms with 32-bit pointer-width such as watchOS. This change drops down to use 1*10^9 on such platforms.
This commit is contained in:
parent
c96e65891d
commit
a4785945c3
@ -33,7 +33,11 @@ public struct ResponsivenessConfigURLs: Codable, Hashable, Sendable {
|
||||
case uploadURL = "upload_url"
|
||||
}
|
||||
|
||||
static var largeDownloadSize: Int { 8 * 1_000_000_000 } // 8 * 10^9
|
||||
#if _pointerBitWidth(_32)
|
||||
static var largeDownloadSize: Int { 1_000_000_000 } // 1 * 10^9
|
||||
#else
|
||||
static var largeDownloadSize: Int { 8_000_000_000 } // 8 * 10^9
|
||||
#endif
|
||||
static var smallDownloadSize: Int { 1 }
|
||||
|
||||
public init(scheme: String, authority: String) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user