Added missing WebSocket import
This commit is contained in:
parent
9ff4aeace5
commit
174f7b999b
@ -1,6 +1,6 @@
|
|||||||
import http, { Server } from 'http'
|
import http, { Server } from 'http'
|
||||||
import express, { Application } from 'express'
|
import express, { Application } from 'express'
|
||||||
import { Server as WsServer } from 'ws'
|
import { Server as WsServer, OPEN as WsOpen } from 'ws'
|
||||||
import initDebug from 'debug'
|
import initDebug from 'debug'
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
import deemix from 'deemix'
|
import deemix from 'deemix'
|
||||||
@ -37,7 +37,7 @@ export class DeemixServer {
|
|||||||
if (logLine) console.log(logLine)
|
if (logLine) console.log(logLine)
|
||||||
if (['downloadInfo', 'downloadWarn'].includes(key)) return
|
if (['downloadInfo', 'downloadWarn'].includes(key)) return
|
||||||
this.wss.clients.forEach(client => {
|
this.wss.clients.forEach(client => {
|
||||||
if (client.readyState === WebSocket.OPEN) {
|
if (client.readyState === WsOpen) {
|
||||||
client.send(JSON.stringify({ key, data }))
|
client.send(JSON.stringify({ key, data }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user