ConnectNamedPipe returning ERROR_PIPE_CONNECTED is not an error.

This commit is contained in:
Robert Shearman 2005-01-06 19:38:48 +00:00 committed by Alexandre Julliard
parent c6559a104c
commit 67bae9f213
1 changed files with 3 additions and 1 deletions

View File

@ -930,7 +930,9 @@ static DWORD WINAPI apartment_listener_thread(LPVOID p)
return 1; /* permanent failure, so quit stubmgr thread */
}
if (!ConnectNamedPipe(listenPipe,NULL)) {
/* an already connected pipe is not an error */
if (!ConnectNamedPipe(listenPipe,NULL) &&
(GetLastError() != ERROR_PIPE_CONNECTED)) {
ERR("Failure during ConnectNamedPipe %ld!\n",GetLastError());
CloseHandle(listenPipe);
continue;