Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make Namespace._fns real private
Browse files Browse the repository at this point in the history
ammut committed Sep 24, 2024

Verified

This commit was signed with the committer’s verified signature.
ammut Samuel Vogelsanger
1 parent d0fc720 commit 38eef73
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
@@ -161,7 +161,7 @@ export class Namespace<
SocketData
>;

protected _fns: Array<
private _fns: Array<
(
socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>,
next: (err?: ExtendedError) => void,
2 changes: 1 addition & 1 deletion packages/socket.io/lib/parent-namespace.ts
Original file line number Diff line number Diff line change
@@ -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),
);

0 comments on commit 38eef73

Please sign in to comment.