Skip to content

Commit

Permalink
Rename to socketConnectTimeoutInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed Jan 2, 2025
1 parent f226a95 commit e23871e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Sources/LiveKit/Support/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class WebSocket: NSObject, Loggable, AsyncSequence, URLSessionWebSocketDelegate
init(url: URL, connectOptions: ConnectOptions?) async throws {
request = URLRequest(url: url,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: connectOptions?.socketConnectTimeout ?? .defaultSocketConnect)
timeoutInterval: connectOptions?.socketConnectTimeoutInterval ?? .defaultSocketConnect)
super.init()
try await withTaskCancellationHandler {
try await withCheckedThrowingContinuation { continuation in
Expand Down
12 changes: 6 additions & 6 deletions Sources/LiveKit/Types/Options/ConnectOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public final class ConnectOptions: NSObject, Sendable {
@objc
public let reconnectAttemptDelay: TimeInterval

/// The timeout interval for the room connection.
/// The timeout interval for the initial websocket connection.
@objc
public let socketConnectTimeout: TimeInterval
public let socketConnectTimeoutInterval: TimeInterval

@objc
public let primaryTransportConnectTimeout: TimeInterval
Expand All @@ -58,7 +58,7 @@ public final class ConnectOptions: NSObject, Sendable {
autoSubscribe = true
reconnectAttempts = 3
reconnectAttemptDelay = .defaultReconnectAttemptDelay
socketConnectTimeout = .defaultSocketConnect
socketConnectTimeoutInterval = .defaultSocketConnect
primaryTransportConnectTimeout = .defaultTransportState
publisherTransportConnectTimeout = .defaultTransportState
iceServers = []
Expand All @@ -80,7 +80,7 @@ public final class ConnectOptions: NSObject, Sendable {
self.autoSubscribe = autoSubscribe
self.reconnectAttempts = reconnectAttempts
self.reconnectAttemptDelay = reconnectAttemptDelay
self.socketConnectTimeout = connectTimeoutInterval
self.socketConnectTimeoutInterval = connectTimeoutInterval
self.primaryTransportConnectTimeout = primaryTransportConnectTimeout
self.publisherTransportConnectTimeout = publisherTransportConnectTimeout
self.iceServers = iceServers
Expand All @@ -95,7 +95,7 @@ public final class ConnectOptions: NSObject, Sendable {
return autoSubscribe == other.autoSubscribe &&
reconnectAttempts == other.reconnectAttempts &&
reconnectAttemptDelay == other.reconnectAttemptDelay &&
socketConnectTimeout == other.socketConnectTimeout &&
socketConnectTimeoutInterval == other.socketConnectTimeoutInterval &&
primaryTransportConnectTimeout == other.primaryTransportConnectTimeout &&
publisherTransportConnectTimeout == other.publisherTransportConnectTimeout &&
iceServers == other.iceServers &&
Expand All @@ -108,7 +108,7 @@ public final class ConnectOptions: NSObject, Sendable {
hasher.combine(autoSubscribe)
hasher.combine(reconnectAttempts)
hasher.combine(reconnectAttemptDelay)
hasher.combine(socketConnectTimeout)
hasher.combine(socketConnectTimeoutInterval)
hasher.combine(primaryTransportConnectTimeout)
hasher.combine(publisherTransportConnectTimeout)
hasher.combine(iceServers)
Expand Down

0 comments on commit e23871e

Please sign in to comment.