pad: Don't throw on socket.io error

This commit is contained in:
Richard Hansen 2021-02-10 18:54:19 -05:00 committed by John McLear
parent fc9f236977
commit 2301c6ec83
2 changed files with 4 additions and 1 deletions

View File

@ -41,6 +41,7 @@
### Notable fixes
* Enter key now stays in focus when inserted at bottom of viewport.
* Suppressed benign socket.io connection errors
* Interface no longer loses color variants on disconnect/reconnect event.
* Removed npm.load to support npm7.
* General code quality is further significantly improved.

View File

@ -271,7 +271,9 @@ const handshake = () => {
pad.collabClient.setStateIdle();
pad.collabClient.setIsPendingRevision(true);
}
throw new Error(`socket.io connection error: ${JSON.stringify(error)}`);
// Don't throw an exception. Error events do not indicate problems that are not already
// addressed by reconnection logic, so throwing an exception each time there's a socket.io error
// just annoys users and fills logs.
});
socket.on('message', (obj) => {