[Box Backup-commit] COMMIT r2105 - box/trunk/lib/server
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 13 Mar 2008 21:30:15 +0000 (UTC)
Author: chris
Date: 2008-03-13 21:30:12 +0000 (Thu, 13 Mar 2008)
New Revision: 2105
Modified:
box/trunk/lib/server/WinNamedPipeStream.cpp
Log:
Ignore ERR_NO_DATA while writing to control socket on Windows, as it
just means that the Pope is being closed.
Modified: box/trunk/lib/server/WinNamedPipeStream.cpp
===================================================================
--- box/trunk/lib/server/WinNamedPipeStream.cpp 2008-03-01 23:21:53 UTC (rev 2104)
+++ box/trunk/lib/server/WinNamedPipeStream.cpp 2008-03-13 21:30:12 UTC (rev 2105)
@@ -440,14 +440,19 @@
if (!Success)
{
+ // ERROR_NO_DATA is a strange name for
+ // "The pipe is being closed". No exception wanted.
+
DWORD err = GetLastError();
- BOX_ERROR("Failed to write to control socket: " <<
- GetErrorMessage(err));
+
+ if (err != ERROR_NO_DATA)
+ {
+ BOX_ERROR("Failed to write to control "
+ socket: " << GetErrorMessage(err));
+ }
+
Close();
- // ERROR_NO_DATA is a strange name for
- // "The pipe is being closed". No exception wanted.
-
if (err == ERROR_NO_DATA)
{
return;