diff --git a/maxutils/maxbase/include/maxbase/http.hh b/maxutils/maxbase/include/maxbase/http.hh index 4136edc71..dba9797f3 100644 --- a/maxutils/maxbase/include/maxbase/http.hh +++ b/maxutils/maxbase/include/maxbase/http.hh @@ -175,7 +175,7 @@ public: }; /** - * Defalt constructor creates an asynchronous operation whose status is ERROR. + * Defalt constructor creates an asynchronous operation whose status is READY. */ Async(); @@ -204,6 +204,11 @@ public: return *this; } + /** + * Resets the instance so that it becomes as if it would have been default constructed. + */ + void reset(); + /** * Return the status of the operation. * diff --git a/maxutils/maxbase/src/http.cc b/maxutils/maxbase/src/http.cc index a6be94184..26ddbc7bf 100644 --- a/maxutils/maxbase/src/http.cc +++ b/maxutils/maxbase/src/http.cc @@ -491,6 +491,11 @@ Async::Async() { } +void Async::reset() +{ + m_sImp = std::make_shared(); +} + Async get_async(const std::vector& urls, const Config& config) {