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.

(cherry picked from commit cf5f2661dc)
This commit is contained in:
Enrico Forestieri 2018-08-07 17:56:07 +02:00
parent e1fa3cb248
commit 48cd67ebf8
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -299,6 +299,8 @@ What's new
- When reconfiguring LyX, correctly detect commands specified with a
full path with spaces (bug 11214).
- Fix the LyX server on Windows so that replies are actually output.
* DOCUMENTATION AND LOCALIZATION