feat(xo-server): avoid warning if client WS has been closed
Fixes part of zammad#8826
This commit is contained in:
parent
5391a9a5ad
commit
d6c3dc87e0
@ -612,7 +612,11 @@ const setUpApi = (webServer, xo, config) => {
|
|||||||
|
|
||||||
const onSend = error => {
|
const onSend = error => {
|
||||||
if (error) {
|
if (error) {
|
||||||
log.warn('WebSocket send:', { error })
|
// even if the readyState of the socket is checked, it can still happen
|
||||||
|
// that the message failed to be sent because the connection was closed.
|
||||||
|
if (error.code !== 'ERR_STREAM_DESTROYED') {
|
||||||
|
log.warn('WebSocket send:', { error })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jsonRpc.on('data', data => {
|
jsonRpc.on('data', data => {
|
||||||
|
Loading…
Reference in New Issue
Block a user