X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FServer.cpp;h=5f5d873f54d79e95d3534b4329bd931bf3fddd1f;hb=4300feb8595c8542050adedf664cd4bfda7ede12;hp=4364f08e4157b7d497477b6d1b93a74582cc485d;hpb=02c9d2e67c16400588dfb103df284121520912a0;p=lyx.git diff --git a/src/Server.cpp b/src/Server.cpp index 4364f08e41..5f5d873f54 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -117,7 +117,7 @@ string errormsg(DWORD const error) return message; } -} // namespace anon +} // namespace DWORD WINAPI pipeServerWrapper(void * arg) @@ -199,8 +199,8 @@ bool LyXComm::pipeServer() LYXERR(Debug::LYXSERVER, "LyXComm: Connection established"); ready_ = true; outbuf_.erase(); - DWORD status; - bool success; + DWORD status = 0; + bool success = false; while (!checkStopServer()) { // Indefinitely wait for the completion of an overlapped @@ -997,7 +997,7 @@ struct Sleep : QThread } }; -} // namespace anon +} // namespace bool LyXComm::loadFilesInOtherInstance() @@ -1067,7 +1067,10 @@ Server::~Server() string message; for (int i = 0; i != numclients_; ++i) { message = "LYXSRV:" + clients_[i] + ":bye\n"; - pipes_.send(message); + // ignore exceptions, we are quitting anyway + try { + pipes_.send(message); + } catch (...) {} } } @@ -1162,7 +1165,7 @@ void Server::callback(string const & msg) << client << " said goodbye"); } else { LYXERR(Debug::LYXSERVER, - "Server: ignoring bye messge from unregistered client" << client); + "Server: ignoring bye message from unregistered client" << client); } } else { LYXERR0("Server: Undefined server command " << cmd << '.');