mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-04-08 18:35:05 +02:00
Fix hang in syncio_close
This commit is contained in:
parent
a915f06c78
commit
63053578bb
@ -293,7 +293,10 @@ syncio_close(struct w32_io* pio)
|
||||
CancelSynchronousIo(pio->read_overlapped.hEvent);
|
||||
}
|
||||
|
||||
WaitForSingleObject(pio->read_overlapped.hEvent, INFINITE);
|
||||
// give the read thread some time to wind down, but don't block syncio_close
|
||||
if (WAIT_TIMEOUT == WaitForSingleObject(pio->read_overlapped.hEvent, 1000)) {
|
||||
debug4("read_overlapped thread timed out");
|
||||
}
|
||||
}
|
||||
|
||||
/* drain queued APCs */
|
||||
|
Loading…
x
Reference in New Issue
Block a user