fix: typo in ws example (#417)

This commit is contained in:
Ryan Finnie 2022-03-05 16:17:19 -08:00 committed by GitHub
parent 74065c7b61
commit 023afb9a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,7 +244,7 @@ server.on('listening', function () {
console.log(`UDP tracker: udp://${udpHost}:${udpPort}`)
// WS
const wsAddr = server.http.address()
const wsAddr = server.ws.address()
const wsHost = wsAddr.address !== '::' ? wsAddr.address : 'localhost'
const wsPort = wsAddr.port
console.log(`WebSocket tracker: ws://${wsHost}:${wsPort}`)