We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2bbaab commit 69976e8Copy full SHA for 69976e8
server.js
@@ -120,11 +120,14 @@ class Server extends EventEmitter {
120
clientTracking: false,
121
...(isObject(opts.ws) ? opts.ws : undefined)
122
})
123
- if (!noServer) {
124
- this.ws.address = () => {
125
- return this.http.address()
+
+ this.ws.address = () => {
+ if (noServer) {
126
+ throw new Error('address() unavailable with { noServer: true }')
127
}
128
+ return this.http.address()
129
130
131
this.ws.on('error', err => { this._onError(err) })
132
this.ws.on('connection', (socket, req) => {
133
// Note: socket.upgradeReq was removed in [email protected], so re-add it.
0 commit comments