diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-01-15 12:32:20 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2017-01-16 02:09:41 +0000 |
commit | 373b4646451200d7565d23793e276540adecf3f9 (patch) | |
tree | b2da67ff1d4f9610a7a32ea5251420b1f724a7a1 /common/IoUtil.cpp | |
parent | b1ff72e13f2af829e0e5e0c79739230a54a982e0 (diff) |
wsd: logs and cosmetics
Change-Id: I67b0a929a50b05cd44de056ce6f8baafb8574dbf
Reviewed-on: https://gerrit.libreoffice.org/33130
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'common/IoUtil.cpp')
-rw-r--r-- | common/IoUtil.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp index 3466dca9c..3991fc317 100644 --- a/common/IoUtil.cpp +++ b/common/IoUtil.cpp @@ -206,14 +206,16 @@ void SocketProcessor(const std::shared_ptr<LOOLWebSocket>& ws, ssize_t writeToPipe(int pipe, const char* buffer, ssize_t size) { ssize_t count = 0; - while(true) + for (;;) { LOG_TRC("Writing to pipe. Data: [" << Util::formatLinesForLog(std::string(buffer, size)) << "]."); const auto bytes = write(pipe, buffer + count, size - count); if (bytes < 0) { if (errno == EINTR || errno == EAGAIN) + { continue; + } LOG_SYS("Failed to write to pipe. Data: [" << std::string(buffer, size) << "]."); count = -1; |