1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Add logging of websocket send errors (#25280)

This commit is contained in:
Emelia Smith 2023-06-10 18:35:57 +02:00 committed by GitHub
parent b19a695608
commit 215081240f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -828,7 +828,11 @@ const startServer = async () => {
return;
}
ws.send(JSON.stringify({ stream: streamName, event, payload }));
ws.send(JSON.stringify({ stream: streamName, event, payload }), (err) => {
if (err) {
log.error(req.requestId, `Failed to send to websocket: ${err}`);
}
});
};
/**