mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-05 08:25:16 +00:00
[trac657] Use OS-independent error messages
The asio wraps them, so we can be portable.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user