diff options
Diffstat (limited to 'async/src/async.h')
-rw-r--r-- | async/src/async.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/async/src/async.h b/async/src/async.h index d6a74c0..18b5979 100644 --- a/async/src/async.h +++ b/async/src/async.h | |||
@@ -514,7 +514,11 @@ private: | |||
514 | // copy by value is const | 514 | // copy by value is const |
515 | auto outFuture = future; | 515 | auto outFuture = future; |
516 | Async::detail::copyFutureValue(watcher->future(), outFuture); | 516 | Async::detail::copyFutureValue(watcher->future(), outFuture); |
517 | outFuture.setFinished(); | 517 | if (watcher->future().errorCode()) { |
518 | outFuture.setError(watcher->future().errorCode(), watcher->future().errorMessage()); | ||
519 | } else { | ||
520 | outFuture.setFinished(); | ||
521 | } | ||
518 | delete watcher; | 522 | delete watcher; |
519 | }); | 523 | }); |
520 | watcher->setFuture(job.exec(in ...)); | 524 | watcher->setFuture(job.exec(in ...)); |