input/async: skip resume and seek if there is a pending error
The resume/seek was received asynchronously and meanwhile an error might have occurred that needs to be handled. This fixes another NFS-related crash bug.
This commit is contained in:
parent
d1e5c90c3b
commit
5b001957c7
@ -251,6 +251,14 @@ AsyncInputStream::DeferredResume() noexcept
|
||||
{
|
||||
const std::scoped_lock protect{mutex};
|
||||
|
||||
if (postponed_exception) {
|
||||
/* do not proceed, first the caller must handle the
|
||||
pending error */
|
||||
caller_cond.notify_one();
|
||||
InvokeOnAvailable();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Resume();
|
||||
} catch (...) {
|
||||
@ -267,6 +275,14 @@ AsyncInputStream::DeferredSeek() noexcept
|
||||
if (seek_state != SeekState::SCHEDULED)
|
||||
return;
|
||||
|
||||
if (postponed_exception) {
|
||||
/* do not proceed, first the caller must handle the
|
||||
pending error */
|
||||
caller_cond.notify_one();
|
||||
InvokeOnAvailable();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Resume();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user