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

Disable SPDY startup #148

Open
wants to merge 2 commits into
base: 0.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions lib/Service/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,19 +1020,19 @@ HTTP.prototype.start = function( started ) {
// TODO: spdy/https should be the default. Make it so, with optional http.
// TODO: allow configurable certificate, supplied by config
// this will allow for standalone mode, as well as a "backend worker" mode.
pem.createCertificate({
/* pem.createCertificate({
days: 90,
selfSigned: true
}, function(err, keys) {
}, function(err, keys) { */

var sslPort = self.maki.config.services.http.port + 443 - 80;
//var sslPort = self.maki.config.services.http.port + 443 - 80;
//self.maki.config.services.spdy.port = sslPort;

//self.maki.httpd = require('http').createServer( self.maki.app );
self.maki.spdyd = require('spdy').createServer({
/* self.maki.spdyd = require('spdy').createServer({
key: keys.serviceKey,
cert: keys.certificate
}, self.maki.app );
}, self.maki.app ); */

self.maki.socks.bind( self.maki );

Expand All @@ -1059,16 +1059,20 @@ HTTP.prototype.start = function( started ) {
if (!self.maki.supress) console.log('[SERVICE]'.bold.green , '[HTTP]'.bold , 'listening'.green, 'for', '[http] '.bold, 'on ' , 'http://' + address.address + ':' + address.port );

self.address = address;

self.emit('started');
self.maki.emit('service:http:started');
return started();

self.maki.serverSPDY = self.maki.spdyd.listen( sslPort , function() {
/*self.maki.serverSPDY = self.maki.spdyd.listen( sslPort , function() {
var address = self.maki.spdyd.address();
if (!self.maki.supress) console.log('[SERVICE]'.bold.green , '[HTTP]'.bold , 'listening'.green, 'for', '[https,spdy]'.bold, 'on' , 'https://' + address.address + ':' + address.port );

self.emit('started');
self.maki.emit('service:http:started');

return started();
});
});*/

});

Expand All @@ -1079,7 +1083,7 @@ HTTP.prototype.start = function( started ) {

HTTP.prototype.destroy = function( cb ) {
this.maki.server.stop();
this.maki.serverSPDY.stop();
//this.maki.serverSPDY.stop();
};

module.exports = HTTP;