commit cf5f2661dc0a902e541704172ab369ba3e5a54d6 Author: Enrico Forestieri <for...@lyx.org> Date: Tue Aug 7 17:56:07 2018 +0200
Fix LyX server on Windows On some recent Windows versions, GetLastError() may also return NO_ERROR instead of ERROR_IO_PENDING during an overlapped write operation to a pipe. This was confusing the state machine in Server.cpp so that replies to commands were scheduled but were never actually output. --- src/Server.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Server.cpp b/src/Server.cpp index 52eebfe..d4a2120 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -356,7 +356,7 @@ bool LyXComm::pipeServer() error = GetLastError(); - if (success && error == ERROR_IO_PENDING) { + if (success && (error == ERROR_IO_PENDING || error == NO_ERROR)) { // The write operation is still pending. // We get here when a reader is started // well before a reply is ready, so delay