suppress some noisy errors
This commit is contained in:
parent
5f2d7c8dcf
commit
5f69fc18d0
@ -17,10 +17,11 @@ module.exports.create = function (config) {
|
|||||||
.on('sessionClose', historyKeeper.sessionClose)
|
.on('sessionClose', historyKeeper.sessionClose)
|
||||||
.on('error', function (error, label, info) {
|
.on('error', function (error, label, info) {
|
||||||
if (!error) { return; }
|
if (!error) { return; }
|
||||||
|
if (['EPIPE', 'ECONNRESET'].indexOf(error && error.code) !== -1) { return; }
|
||||||
/* labels:
|
/* labels:
|
||||||
SEND_MESSAGE_FAIL, SEND_MESSAGE_FAIL_2, FAIL_TO_DISCONNECT,
|
SEND_MESSAGE_FAIL, SEND_MESSAGE_FAIL_2, FAIL_TO_DISCONNECT,
|
||||||
FAIL_TO_TERMINATE, HANDLE_CHANNEL_LEAVE, NETFLUX_BAD_MESSAGE,
|
FAIL_TO_TERMINATE, HANDLE_CHANNEL_LEAVE, NETFLUX_BAD_MESSAGE,
|
||||||
NETFLUX_WEBSOCKET_ERROR
|
NETFLUX_WEBSOCKET_ERROR, NF_ENOENT
|
||||||
*/
|
*/
|
||||||
log.error(label, {
|
log.error(label, {
|
||||||
code: error.code,
|
code: error.code,
|
||||||
|
|||||||
@ -190,7 +190,7 @@ module.exports.create = function (config, cb) {
|
|||||||
},
|
},
|
||||||
sessionClose: function (userId, reason) {
|
sessionClose: function (userId, reason) {
|
||||||
HK.closeNetfluxSession(Env, userId);
|
HK.closeNetfluxSession(Env, userId);
|
||||||
if (['BAD_MESSAGE', 'SOCKET_ERROR', 'SEND_MESSAGE_FAIL_2'].indexOf(reason) !== -1) {
|
if (['BAD_MESSAGE', 'SEND_MESSAGE_FAIL_2'].indexOf(reason) !== -1) {
|
||||||
if (reason && reason.code === 'ECONNRESET') { return; }
|
if (reason && reason.code === 'ECONNRESET') { return; }
|
||||||
return void Log.error('SESSION_CLOSE_WITH_ERROR', {
|
return void Log.error('SESSION_CLOSE_WITH_ERROR', {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user