aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-26 08:34:48 +0100
committerMartin Ridgers <[email protected]>2021-11-26 08:34:48 +0100
commit421a58e42dfbbbe9a321f06c0b12080da35c857c (patch)
tree1f8ddcdabf807cb5d58d7eb97b543e18a4ec2899
parentThrow HTTP client errors from zenserver-test (diff)
downloadzen-421a58e42dfbbbe9a321f06c0b12080da35c857c.tar.xz
zen-421a58e42dfbbbe9a321f06c0b12080da35c857c.zip
ASIO error type is asio::error_code not std::error_code
-rw-r--r--zenserver-test/zenserver-test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp
index 139a43981..3aeef8cba 100644
--- a/zenserver-test/zenserver-test.cpp
+++ b/zenserver-test/zenserver-test.cpp
@@ -163,7 +163,7 @@ public:
private:
void Reset() {}
- void OnError(const std::error_code& Error)
+ void OnError(const asio::error_code& Error)
{
using namespace fmt::literals;
zen::ThrowLastError("HTTP client error! '{}'"_format(Error.message()));
@@ -209,7 +209,7 @@ private:
// Send initial request payload
asio::async_write(m_Socket,
asio::const_buffer(m_RequestBody.data(), m_RequestBody.size()),
- [this](const std::error_code& Error, size_t Bytes) {
+ [this](const asio::error_code& Error, size_t Bytes) {
ZEN_UNUSED(Bytes);
if (Error)
{
@@ -222,7 +222,7 @@ private:
void OnRequestWritten()
{
- asio::async_read(m_Socket, m_ResponseBuffer, asio::transfer_at_least(1), [this](const std::error_code& Error, size_t Bytes) {
+ asio::async_read(m_Socket, m_ResponseBuffer, asio::transfer_at_least(1), [this](const asio::error_code& Error, size_t Bytes) {
if (Error)
{
return OnError(Error);
@@ -253,7 +253,7 @@ private:
asio::async_read(m_Socket,
m_ResponseBuffer,
asio::transfer_at_least(1),
- [this](const std::error_code& Error, size_t Bytes) {
+ [this](const asio::error_code& Error, size_t Bytes) {
if (Error)
{
return OnError(Error);
@@ -347,9 +347,9 @@ HttpConnectionPool::GetConnection()
asio::ip::tcp::resolver Resolver{m_Context};
- std::error_code ErrCode;
- auto it = Resolver.resolve(m_HostName, Service, ErrCode);
- auto itEnd = asio::ip::tcp::resolver::iterator();
+ asio::error_code ErrCode;
+ auto it = Resolver.resolve(m_HostName, Service, ErrCode);
+ auto itEnd = asio::ip::tcp::resolver::iterator();
if (ErrCode)
{