Rely on kernel errno when logging resource exhaustion
Hello,
Here is my attempt to fix #40613 (closed). I split the socket_failed_from_resource_exhaustion function into 2 different functions that are called in the needed cases depending on the errno value.