add peerWs emit

This commit is contained in:
Sergii Bliznichenko 2022-10-03 14:02:07 +03:00
parent 355dc574f8
commit e2854ca9b1
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ const createInstance = ({ app, server, options }) => {
config: customConfig
});
app.set('peerWs', wss);
app.emit('peerWs', wss);
wss.on("connection", (client) => {
const messageQueue = realm.getMessageQueueById(client.getId());
if (messageQueue) {

View File

@ -46,6 +46,7 @@ export const createInstance = ({ app, server, options }: {
});
app.set('peerWs', wss);
app.emit('peerWs', wss);
wss.on("connection", (client: IClient) => {
const messageQueue = realm.getMessageQueueById(client.getId());