fix #1845: fixed an error during writing to closed socket

This commit is contained in:
antelle 2021-07-18 16:04:48 +02:00
parent 9b2c40a078
commit 29ae7e8ed2
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 8 additions and 1 deletions

View File

@ -398,7 +398,11 @@ function sendMessageToSocket(socket, message) {
const lengthBytes = Buffer.from(lengthBuf);
const data = Buffer.concat([lengthBytes, responseData]);
socket.write(data);
try {
socket.write(data);
} catch (e) {
logger.error(`Error writing to socket ${state.socketId}`, e);
}
}
function sendToRenderer(event, socketId, data) {

View File

@ -1,5 +1,8 @@
Release notes
-------------
##### v1.18.7 (2021-07-18)
`-` fix #1845: fixed a visible crash on socket write error
##### v1.18.6 (2021-05-19)
`-` fix #1824: saving KDBX3 files with compression disabled
`-` fix #1818: extension connection error if browser cannot be identified