No more http2

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-09 14:05:31 +01:00
parent cddce88207
commit 8a3b2113f8
2 changed files with 3 additions and 3 deletions

View File

@@ -78,10 +78,10 @@ function startSingle(clustered, redis_enabled) {
ca: ca ca: ca
}; };
var https = require('https'); var https = require('https');
server = require('http2').createServer(credentials, routingFunction); server = https.Server(credentials, routingFunction);
} catch(err){ } catch(err){
console.log("Starting without https (probably on localhost)"); console.log("Starting without https (probably on localhost)");
server = require('http2').createServer(routingFunction); server = http.createServer(routingFunction);
} }
if(clustered) { if(clustered) {

View File

@@ -619,7 +619,7 @@ var Channel = {
} }
function get_history() { function get_history() {
if(socket.id) { if(socket && socket.id) {
var p = Crypt.get_userpass(); var p = Crypt.get_userpass();
var c = Crypt.crypt_pass(p, true); var c = Crypt.crypt_pass(p, true);
socket.emit("get_history", {channel: chan.toLowerCase(), all: false, pass: embed ? '' : c}); socket.emit("get_history", {channel: chan.toLowerCase(), all: false, pass: embed ? '' : c});