From fd9a59acf230296f51f2bba6b85a4bd5852bb111 Mon Sep 17 00:00:00 2001 From: sletz Date: Fri, 6 Jan 2012 18:02:42 +0000 Subject: [PATCH] More robust JackWinNamedPipeClient::ConnectAux(). git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4671 0c269be4-1314-0410-8aa9-9f06e86f4224 --- windows/JackWinNamedPipe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windows/JackWinNamedPipe.cpp b/windows/JackWinNamedPipe.cpp index c003d8e5..c0ed1447 100644 --- a/windows/JackWinNamedPipe.cpp +++ b/windows/JackWinNamedPipe.cpp @@ -99,15 +99,15 @@ int JackWinNamedPipeClient::ConnectAux() return 0; } - // Exit if an error other than ERROR_PIPE_BUSY occurs. - if (GetLastError() != ERROR_PIPE_BUSY) { + // Exit if an error other than ERROR_PIPE_BUSY or ERROR_FILE_NOT_FOUND occurs. + if ((GetLastError() != ERROR_PIPE_BUSY) && (GetLastError() != ERROR_FILE_NOT_FOUND)) { jack_error("Cannot connect to named pipe = %s err = %ld", fName, GetLastError()); return -1; } // All pipe instances are busy, so wait for 2 seconds. if (!WaitNamedPipe(fName, 2000)) { - jack_error("Cannot connect to named pipe = %s err = %ld", fName, GetLastError()); + jack_error("Cannot connect to named pipe after wait = %s err = %ld", fName, GetLastError()); return -1; } }