add peerWs to app

This commit is contained in:
Sergii Kliuchnyk 2022-09-30 11:41:38 +03:00 committed by GitHub
parent aa9963d003
commit 8695256271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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