Skip to content

Commit 5621fa8

Browse files
massimocandelammarchini
authored andcommitted
avoid loading spdy if not used and prevent deprecation warning
1 parent a65635c commit 5621fa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var _ = require('lodash');
1111
var assert = require('assert-plus');
1212
var errors = require('restify-errors');
1313
var mime = require('mime');
14-
var spdy = require('spdy');
1514
var vasync = require('vasync');
1615

1716
var Chain = require('./chain');
@@ -187,6 +186,7 @@ function Server(options) {
187186
];
188187

189188
if (options.spdy) {
189+
var spdy = require('spdy');
190190
this.spdy = true;
191191
this.server = spdy.createServer(options.spdy);
192192
} else if (options.http2) {

0 commit comments

Comments
 (0)