don't crash if nsp starts with /
This commit is contained in:
parent
18a561f78a
commit
c4731dc298
@ -103,7 +103,11 @@ public class SocketIOClient: NSObject, SocketEngineClient {
|
|||||||
self.reconnectWait = abs(reconnectWait)
|
self.reconnectWait = abs(reconnectWait)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let nsp = opts!["nsp"] as? String {
|
if var nsp = opts!["nsp"] as? String {
|
||||||
|
if nsp.hasPrefix("/") {
|
||||||
|
nsp.removeAtIndex(nsp.startIndex)
|
||||||
|
}
|
||||||
|
|
||||||
self.nsp = nsp
|
self.nsp = nsp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user