2
0
mirror of https://github.com/ad1217/PrinterStatus synced 2024-11-21 23:13:49 -05:00

Handle errors in the webcam proxy

This commit is contained in:
Adam Goldsmith 2020-02-19 18:37:32 -05:00
parent 5384f36c6d
commit df4c518841

View File

@ -19,6 +19,10 @@ const config: {
} = yaml.safeLoad(fs.readFileSync('config.yaml', 'utf8')); } = yaml.safeLoad(fs.readFileSync('config.yaml', 'utf8'));
const proxy = httpProxy.createProxyServer({}); const proxy = httpProxy.createProxyServer({});
proxy.on('error', function(e) {
console.error('Proxy failed:');
console.error(e);
});
let printerStatuses: PrinterStatus[] = []; let printerStatuses: PrinterStatus[] = [];
function broadcast(data: WebSocket.Data) { function broadcast(data: WebSocket.Data) {