Skip to content

Commit

Permalink
fix: set tcp timeout to default (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
kneekey23 authored Nov 2, 2021
1 parent f226295 commit 59a0086
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public class CRTClientEngine: HttpClientEngine {
logger.error("Server name was not able to be set in TLS Connection Options. TLS Negotiation will fail.")
logger.error("Error: \(err.localizedDescription)")
}
let socketOptions = SocketOptions(socketType: .stream)
var socketOptions = SocketOptions(socketType: .stream)
#if os(iOS) || os(watchOS)
socketOptions.connectTimeoutMs = 30_000
#endif
let options = HttpClientConnectionOptions(clientBootstrap: SDKDefaultIO.shared.clientBootstrap,
hostName: endpoint.host,
initialWindowSize: windowSize,
Expand Down

0 comments on commit 59a0086

Please sign in to comment.