server connection error report

This commit is contained in:
Jan Prochazka 2020-11-28 09:14:33 +01:00
parent 13a18eb556
commit 49628ad3cf
2 changed files with 5 additions and 5 deletions

View File

@ -19,9 +19,6 @@ module.exports = {
existing.status = status;
socket.emitChanged(`server-status-changed`);
},
handle_error(conid, { error }) {
console.log(`Error in server connection ${conid}: ${error}`);
},
handle_ping() {},
async ensureOpened(conid) {

View File

@ -96,8 +96,11 @@ function start() {
process.on('message', async (message) => {
try {
await handleMessage(message);
} catch (e) {
process.send({ msgtype: 'error', error: e.message });
} catch (err) {
setStatus({
name: 'error',
message: err.message,
});
}
});
}