clients.remove(client);
});
- wl.on('listening', webListenerRunning);
+ wl.on('listening', function () {
+ console.log('Listening on %s:%s %s SSL', server.address, server.port, (server.ssl ? 'with' : 'without'));
+ webListenerRunning();
+ });
+
+ wl.on('error', function (err) {
+ console.log('Error listening on %s:%s: %s', server.address, server.port, err.code);
+ // TODO: This should probably be refactored. ^JA
+ webListenerRunning();
+ });
});
// Once all the listeners are listening, set the processes UID/GID
hs.listen(web_config.port, web_config.address, function () {
that.emit('listening');
});
-
- console.log('Listening on ' + web_config.address + ':' + web_config.port.toString() + ' with SSL');
} else {
// Start some plain-text server up
hs.listen(web_config.port, web_config.address, function () {
that.emit('listening');
});
-
- console.log('Listening on ' + web_config.address + ':' + web_config.port.toString() + ' without SSL');
}
+
+ hs.on('error', function (err) {
+ that.emit('error', err);
+ })
this.ws.enable('browser client minification');
this.ws.enable('browser client etag');