Skip to content
Snippets Groups Projects
Commit ddeb8d85 authored by Sönke Holz's avatar Sönke Holz
Browse files

network: GetAndLogLastError: ignore Errno::AGAIN

If non-blocking sockets are used, they generate a lot of Errno::AGAIN errors when they didn't receive any data. These errors shouldn't be logged.
parent dd5c41b5
No related branches found
No related tags found
No related merge requests found
...@@ -227,8 +227,12 @@ Errno GetAndLogLastError() { ...@@ -227,8 +227,12 @@ Errno GetAndLogLastError() {
#else #else
int e = errno; int e = errno;
#endif #endif
const Errno err = TranslateNativeError(e);
if (err == Errno::AGAIN) {
return err;
}
LOG_ERROR(Network, "Socket operation error: {}", NativeErrorToString(e)); LOG_ERROR(Network, "Socket operation error: {}", NativeErrorToString(e));
return TranslateNativeError(e); return err;
} }
int TranslateDomain(Domain domain) { int TranslateDomain(Domain domain) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment