Skip to content

Commit

Permalink
[minor] Silence deprecation warning
Browse files Browse the repository at this point in the history
Fixes #1829
  • Loading branch information
lpinca committed Dec 28, 2020
1 parent c171962 commit a2c0d44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ function tlsConnect(options) {
options.path = undefined;

if (!options.servername && options.servername !== '') {
options.servername = options.host;
options.servername = net.isIP(options.host) ? '' : options.host;
}

return tls.connect(options);
Expand Down
2 changes: 1 addition & 1 deletion test/websocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ describe('WebSocket', () => {
});

server.listen(0, () => {
const ws = new WebSocket(`wss://localhost:${server.address().port}`, {
const ws = new WebSocket(`wss://127.0.0.1:${server.address().port}`, {
rejectUnauthorized: false
});
});
Expand Down

0 comments on commit a2c0d44

Please sign in to comment.