Skip to content

Commit

Permalink
Rename option
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed Jan 2, 2025
1 parent 0ff2814 commit f226a95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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?.connectTimeoutInterval ?? .defaultSocketConnect)
timeoutInterval: connectOptions?.socketConnectTimeout ?? .defaultSocketConnect)
super.init()
try await withTaskCancellationHandler {
try await withCheckedThrowingContinuation { continuation in
Expand Down
10 changes: 5 additions & 5 deletions Sources/LiveKit/Types/Options/ConnectOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final class ConnectOptions: NSObject, Sendable {

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

@objc
public let primaryTransportConnectTimeout: TimeInterval
Expand All @@ -58,7 +58,7 @@ public final class ConnectOptions: NSObject, Sendable {
autoSubscribe = true
reconnectAttempts = 3
reconnectAttemptDelay = .defaultReconnectAttemptDelay
connectTimeoutInterval = .defaultSocketConnect
socketConnectTimeout = .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.connectTimeoutInterval = connectTimeoutInterval
self.socketConnectTimeout = 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 &&
connectTimeoutInterval == other.connectTimeoutInterval &&
socketConnectTimeout == other.socketConnectTimeout &&
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(connectTimeoutInterval)
hasher.combine(socketConnectTimeout)
hasher.combine(primaryTransportConnectTimeout)
hasher.combine(publisherTransportConnectTimeout)
hasher.combine(iceServers)
Expand Down

0 comments on commit f226a95

Please sign in to comment.