Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rg911 committed Mar 4, 2021
1 parent 469ba0a commit db3e28a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions rest/src/server/websocketUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ module.exports = {
client.send(view, err => {
if (err) {
winston.error(`websocket ${client.uid}: error sending data to websocket`, err);
if (err && err.message) {
if (err.message)
client.close(1013, err.message.substring(0, 123));
} else {
else
client.close();
}
}
});
});
Expand All @@ -77,11 +76,10 @@ module.exports = {

const closeWithError = (message, err) => {
winston.error(`websocket ${client.uid}: ${message}`, err);
if (err && err.message) {
if (err && err.message)
client.close(1013, err.message.substring(0, 123));
} else {
else
client.close();
}
};

client.on('error', err => {
Expand Down

0 comments on commit db3e28a

Please sign in to comment.