be more verbose in logging when the REST service network layer returns errors;

pull/33/head
Bryan Biedenkapp 3 years ago
parent ca7eb1a407
commit 95e0ed9260

@ -40,6 +40,7 @@
#include "Defines.h"
#include "network/rest/http/HTTPLexer.h"
#include "network/rest/http/HTTPPayload.h"
#include "Log.h"
#include "Utils.h"
#include <array>
@ -135,6 +136,9 @@ namespace network
}
}
else if (ec != asio::error::operation_aborted) {
if (ec) {
::LogError(LOG_REST, "%s, code = %u", ec.message().c_str(), ec.value());
}
stop();
}
});
@ -152,6 +156,8 @@ namespace network
{
asio::error_code ec = e.code();
if (ec) {
::LogError(LOG_REST, "%s, code = %u", ec.message().c_str(), ec.value());
// initiate graceful connection closure
asio::error_code ignored_ec;
m_socket.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);

@ -40,6 +40,7 @@
#include "Defines.h"
#include "network/rest/http/HTTPLexer.h"
#include "network/rest/http/HTTPPayload.h"
#include "Log.h"
#include "Utils.h"
#include <array>
@ -138,6 +139,9 @@ namespace network
}
}
else if (ec != asio::error::operation_aborted) {
if (ec) {
::LogError(LOG_REST, "%s, code = %u", ec.message().c_str(), ec.value());
}
m_connectionManager.stop(this->shared_from_this());
}
});
@ -170,6 +174,9 @@ namespace network
}
if (ec != asio::error::operation_aborted) {
if (ec) {
::LogError(LOG_REST, "%s, code = %u", ec.message().c_str(), ec.value());
}
m_connectionManager.stop(this->shared_from_this());
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.