From 81d58fbd69bc464b7ac34b0c3ddb0a91069e1a0e Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Mar 2015 12:22:59 -0400 Subject: [PATCH] fix nsp for default --- SwiftIO/SocketIOClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftIO/SocketIOClient.swift b/SwiftIO/SocketIOClient.swift index 337aa45..91f4711 100644 --- a/SwiftIO/SocketIOClient.swift +++ b/SwiftIO/SocketIOClient.swift @@ -104,7 +104,7 @@ public class SocketIOClient: NSObject, SocketEngineClient { } if var nsp = opts!["nsp"] as? String { - if nsp.hasPrefix("/") { + if nsp != "/" && nsp.hasPrefix("/") { nsp.removeAtIndex(nsp.startIndex) }