Commit 34eaa7c5 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

[trac657] Use OS-independent error messages

The asio wraps them, so we can be portable.
parent b2d210a1
......@@ -91,11 +91,10 @@ TCPServer::operator()(error_code ec, size_t length) {
// Abort on fatal errors
// TODO: Log error?
if (ec) {
if (ec.category() != error::system_category) {
return;
}
if (ec.value() != EWOULDBLOCK && ec.value() != EAGAIN &&
ec.value() != ECONNABORTED && ec.value() != EINTR) {
using namespace asio::error;
if (ec.value() != would_block && ec.value() != try_again &&
ec.value() != connection_aborted &&
ec.value() != interrupted) {
return;
}
}
......
......@@ -198,11 +198,9 @@ UDPServer::operator()(error_code ec, size_t length) {
*this);
// Abort on fatal errors
if (ec) {
if (ec.category() != error::system_category) {
return;
}
if (ec.value() != EWOULDBLOCK && ec.value() != EAGAIN &&
ec.value() != EINTR) {
using namespace asio::error;
if (ec.value() != would_block && ec.value() != try_again &&
ec.value() != interrupted) {
return;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment