|
@@ -41,6 +41,8 @@ export const createInstance = ({ app, server, options }: {
|
|
realm,
|
|
realm,
|
|
config: customConfig
|
|
config: customConfig
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ app.peerWs = wss;
|
|
|
|
|
|
wss.on("connection", (client: IClient) => {
|
|
wss.on("connection", (client: IClient) => {
|
|
const messageQueue = realm.getMessageQueueById(client.getId());
|
|
const messageQueue = realm.getMessageQueueById(client.getId());
|
|
@@ -72,4 +74,4 @@ export const createInstance = ({ app, server, options }: {
|
|
|
|
|
|
messagesExpire.startMessagesExpiration();
|
|
messagesExpire.startMessagesExpiration();
|
|
checkBrokenConnections.start();
|
|
checkBrokenConnections.start();
|
|
-};
|
|
|
|
|
|
+};
|