mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
winpr: don't close file descriptor if we set it again to the same file
This commit is contained in:
@@ -416,7 +416,7 @@ int SetEventFileDescriptor(HANDLE hEvent, int FileDescriptor, ULONG mode)
|
||||
|
||||
event = (WINPR_EVENT*)Object;
|
||||
|
||||
if (!event->bAttached && event->pipe_fd[0] >= 0)
|
||||
if (!event->bAttached && event->pipe_fd[0] >= 0 && event->pipe_fd[0] != FileDescriptor)
|
||||
close(event->pipe_fd[0]);
|
||||
|
||||
event->bAttached = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user