diff --git a/openvidu-node-client/src/Session.ts b/openvidu-node-client/src/Session.ts index d2882683..52fe881f 100644 --- a/openvidu-node-client/src/Session.ts +++ b/openvidu-node-client/src/Session.ts @@ -472,6 +472,8 @@ export class Session { publishers, subscribers)); }); + // Order connections by time of creation + this.activeConnections.sort((c1, c2) => (c1.createdAt > c2.createdAt) ? 1 : ((c2.createdAt > c1.createdAt) ? -1 : 0)); return this; }