Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/mqtt-5.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike authored Dec 12, 2024
2 parents 804144a + b938bf7 commit c26563e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/webserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { type certificatesType } from '../models/Config.js'
import { ErrorResponse } from '../utils/amtHelper.js'
import { logger, messages } from '../logging/index.js'
import routes from '../routes/index.js'
import WebSocket from 'ws'
import { WebSocketServer, ServerOptions, WebSocket } from 'ws'
import { URL, fileURLToPath, pathToFileURL } from 'node:url'
import cors from 'cors'
import { lstatSync, existsSync, readdirSync } from 'node:fs'
Expand All @@ -32,7 +32,7 @@ import path from 'node:path'
export class WebServer {
app: express.Express
server: Server = null
relayWSS: WebSocket.Server = null
relayWSS: WebSocketServer = null
secrets: ISecretManagerService
certs: certificatesType
// to unit test code
Expand All @@ -49,11 +49,11 @@ export class WebServer {
this.certs = certs
this.app = express()

const options: WebSocket.ServerOptions = {
const options: ServerOptions = {
noServer: true,
verifyClient: (info) => this.verifyClientToken(info)
}
this.relayWSS = new WebSocket.Server(options)
this.relayWSS = new WebSocketServer(options)

// Create Server
this.server = createServer(this.app)
Expand Down

0 comments on commit c26563e

Please sign in to comment.