diff --git a/packages/xo-server/src/index.mjs b/packages/xo-server/src/index.mjs index bf57cf91f..1b0bd1db9 100644 --- a/packages/xo-server/src/index.mjs +++ b/packages/xo-server/src/index.mjs @@ -612,7 +612,11 @@ const setUpApi = (webServer, xo, config) => { const onSend = 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 => {