Skip to content

Commit

Permalink
fix: make Namespace._fns real private
Browse files Browse the repository at this point in the history
  • Loading branch information
ammut committed Sep 24, 2024
1 parent d0fc720 commit 38eef73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/socket.io/lib/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class Namespace<
SocketData
>;

protected _fns: Array<
private _fns: Array<
(
socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>,
next: (err?: ExtendedError) => void,
Expand Down
2 changes: 1 addition & 1 deletion packages/socket.io/lib/parent-namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class ParentNamespace<
): Namespace<ListenEvents, EmitEvents, ServerSideEvents, SocketData> {
debug("creating child namespace %s", name);
const namespace = new Namespace(this.server, name);
this._fns.forEach((fn) => namespace.use(fn));
this["_fns"].forEach((fn) => namespace.use(fn));
this.listeners("connect").forEach((listener) =>
namespace.on("connect", listener),
);
Expand Down

0 comments on commit 38eef73

Please sign in to comment.