Skip to content

Commit 3736596

Browse files
pkrizanmattqs
authored andcommitted
fix for wrong namespace creation: if using uri with queryParams, queryParams wused to be included in namespace. Path should only be included in namespace. (#179)
1 parent 853292c commit 3736596

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Src/SocketIoClientDotNet.net45/Client/IO.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public static Socket Socket(Uri uri, Options opts)
6060
}
6161
io = Managers[id];
6262
}
63-
return io.Socket(uri.PathAndQuery);
63+
64+
//fix: used to paste path and query to namespace. Namespace is only supposed to use path
65+
return io.Socket(uri.AbsolutePath);
6466
}
6567

6668

Src/SocketIoClientDotNet.net45/Client/Manager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private Manager Open(IOpenCallback fn)
204204
Emit(EVENT_ENGINE, socket);
205205

206206
ReadyState = ReadyStateEnum.OPENING;
207-
OpeningSockets.Add(Socket(Uri.PathAndQuery));
207+
OpeningSockets.Add(Socket(Uri.AbsolutePath));
208208
SkipReconnect = false;
209209

210210
var openSub = SocketIoClientDotNet.Client.On.Create(socket, Engine.EVENT_OPEN, new ListenerImpl(() =>

0 commit comments

Comments
 (0)