Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wsd: net: handle unexpected closed-socket gracefully
Previously, we threw an exception in this case, which had a couple of unfortunately side-effects. First, the onDisconnect() handler wasn't called. This prevented proper reconnection logic in some cases. Second, it created different behavior depending on _how_ we detected the disconnection. That is, depending on the value of the various return values and error codes, we either threw or returned with errno. This treats all disconnection/unexpected socket errors as EPIPE and returns 0. Change-Id: Ia27a055a3cbcf639c62b82506f7cb683e99146f2 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
- Loading branch information