mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 01:05:14 +02:00
Fix hang in syncio_close (#763)
This commit is contained in:
parent
265df19787
commit
0c3137f621
@ -293,7 +293,10 @@ syncio_close(struct w32_io* pio)
|
|||||||
CancelSynchronousIo(pio->read_overlapped.hEvent);
|
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 */
|
/* drain queued APCs */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user