MXS-2468 Allow an http::Async object to be reset

This commit is contained in:
Johan Wikman
2019-05-03 14:57:41 +03:00
parent d498f1042c
commit 5ab0876a5f
2 changed files with 11 additions and 1 deletions

View File

@ -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.
*

View File

@ -491,6 +491,11 @@ Async::Async()
{
}
void Async::reset()
{
m_sImp = std::make_shared<ReadyImp>();
}
Async get_async(const std::vector<std::string>& urls,
const Config& config)
{