Browse Source

More robust JackWinNamedPipeClient::ConnectAux().

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4671 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.9.5
sletz 14 years ago
parent
commit
fd9a59acf2
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      windows/JackWinNamedPipe.cpp

+ 3
- 3
windows/JackWinNamedPipe.cpp View File

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


Loading…
Cancel
Save