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
};
var https = require('https');
server = require('http2').createServer(credentials, routingFunction);
server = https.Server(credentials, routingFunction);
} catch(err){
console.log("Starting without https (probably on localhost)");
server = require('http2').createServer(routingFunction);
server = http.createServer(routingFunction);
}
if(clustered) {

View File

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