Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SPDY fails in node >= 11.1.0 #1660

Merged
merged 4 commits into from
Feb 18, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const tls = require('tls');
const url = require('url');
const http = require('http');
const https = require('https');
const spdy = require('spdy');
const sockjs = require('sockjs');

const semver = require('semver');
Expand Down Expand Up @@ -630,7 +629,9 @@ function Server(compiler, options = {}, _log) {
if (semver.gte(process.version, '10.0.0')) {
this.listeningApp = https.createServer(options.https, app);
} else {
this.listeningApp = spdy.createServer(options.https, app);
/* eslint-disable global-require */
this.listeningApp = require('spdy').createServer(options.https, app);
/* eslint-enable global-require */
yi-ge marked this conversation as resolved.
Show resolved Hide resolved
}
} else {
this.listeningApp = http.createServer(app);
Expand Down