Skip to content

Commit bbb383d

Browse files
committed
fix secure connections
1 parent c818ed2 commit bbb383d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SocketIOClientSwift/SocketIOClient.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
3232
public private(set) var status = SocketIOClientStatus.NotConnected
3333

3434
public var nsp = "/"
35-
public var options: Set<SocketIOClientOption>?
35+
public var options: Set<SocketIOClientOption>
3636
public var reconnects = true
3737
public var reconnectWait = 10
3838
public var sid: String? {
@@ -59,11 +59,11 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
5959
/**
6060
Type safe way to create a new SocketIOClient. opts can be omitted
6161
*/
62-
public init(var socketURL: String, options: Set<SocketIOClientOption>? = nil) {
62+
public init(var socketURL: String, options: Set<SocketIOClientOption> = []) {
6363
self.options = options
6464

6565
if socketURL["https://"].matches().count != 0 {
66-
self.options?.insertIgnore(.Secure(true))
66+
self.options.insertIgnore(.Secure(true))
6767
}
6868

6969
socketURL = socketURL["http://"] ~= ""
@@ -94,7 +94,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
9494
}
9595
}
9696

97-
self.options?.insertIgnore(.Path("/socket.io"))
97+
self.options.insertIgnore(.Path("/socket.io"))
9898

9999
super.init()
100100
}

0 commit comments

Comments
 (0)