Skip to content

Commit 4ca49a6

Browse files
authored
refator: remove old node fix (#203)
Only node 10 is supported for a long time. The fix for node < 10 can be removed.
1 parent 844be26 commit 4ca49a6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/server.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
included in all copies or substantial portions of this Source Code Form.
1010
*/
1111
const url = require('url');
12-
const { createServer, ServerResponse } = require('http');
12+
const { createServer } = require('http');
1313

1414
const open = require('open');
1515

@@ -96,12 +96,6 @@ const start = async function start() {
9696
}
9797
};
9898

99-
// Node < v10 doesn't send upgrade requests through. This simulates what occurs on
100-
// on Node >= v10
101-
if (parseInt(process.versions.node, 10) < 10) {
102-
server.on('upgrade', (req) => server.emit('request', req, new ServerResponse(req)));
103-
}
104-
10599
this.listening = true;
106100

107101
const protocol = secure ? 'https' : 'http';

0 commit comments

Comments
 (0)