Skip to content

Commit

Permalink
default state for WebSocketEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
svojsu committed Jun 18, 2024
1 parent 011b5e9 commit 7725d76
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SubstrateSdk/Classes/Network/WebSocketEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class WebSocketEngine {
public let pingInterval: TimeInterval
public let connectionTimeout: TimeInterval

public private(set) var state: State {
public private(set) var state: State = .notConnected(url: nil) {
didSet {
if let delegate = delegate {
let oldState = oldValue
Expand Down Expand Up @@ -124,7 +124,6 @@ public final class WebSocketEngine {
self.pingInterval = pingInterval
self.connectionTimeout = connectionTimeout
self.selectedURLIndex = 0
self.state = .notConnected(url: urls[selectedURLIndex])

guard let url = urls.first else {
return nil
Expand Down

0 comments on commit 7725d76

Please sign in to comment.