Fix linking sessions to sockets when using SSL

This commit is contained in:
Zaid Abdulla committed 2017-02-22 04:22:26 -08:00
1 parent 5aec919a4e
commit b342cfd159
1 file changed
+2 -3
+2 -3
View File
@@ -82,11 +82,10 @@ if useHttps
.match(/\-+BEGIN CERTIFICATE\-+[0-9a-zA-Z\+\-\/\=\s]+?\-+END CERTIFICATE\-+/g)
server = require('https').createServer(options, listener)
server.on('secureConnection', onConnection) if onConnection?
else
server = require('http').createServer(listener)
if onConnection?
server.on('connection', onConnection)
server.on('connection', onConnection) if onConnection?
db.connect((err) ->
throw err if err