Skip to content

Commit

Permalink
Try namespace if /namespace not found
Browse files Browse the repository at this point in the history
  • Loading branch information
berinhardt committed Jan 8, 2025
1 parent 37a6312 commit 0965c57
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, PacketsM
try {
Packet packet = decoder.decodePackets(content, client);

Namespace ns = namespacesHub.get(packet.getNsp());
String namespace = packet.getNsp();
Namespace ns = namespacesHub.get(namespace);
if (ns == null && namespace.charAt(0) == '/')
ns = namespacesHub.get(namespace.substring(1));

if (ns == null) {
if (packet.getSubType() == PacketType.CONNECT) {
Packet p = new Packet(PacketType.MESSAGE, client.getEngineIOVersion());
Expand Down

0 comments on commit 0965c57

Please sign in to comment.