diff --git a/SwiftIO/SocketIOClient.swift b/SwiftIO/SocketIOClient.swift index dd78211..337aa45 100644 --- a/SwiftIO/SocketIOClient.swift +++ b/SwiftIO/SocketIOClient.swift @@ -103,7 +103,11 @@ public class SocketIOClient: NSObject, SocketEngineClient { 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 }