|
|
|
@ -45,6 +45,7 @@ |
|
|
|
|
#include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" |
|
|
|
|
#include "src/core/lib/event_engine/tcp_socket_utils.h" |
|
|
|
|
#include "src/core/lib/gprpp/status_helper.h" |
|
|
|
|
#include "src/core/lib/gprpp/strerror.h" |
|
|
|
|
#include "src/core/lib/gprpp/time.h" |
|
|
|
|
#include "src/core/lib/iomgr/socket_mutator.h" |
|
|
|
|
|
|
|
|
@ -173,7 +174,7 @@ void PosixEngineListenerImpl::AsyncConnectionAcceptor::NotifyOnAccept( |
|
|
|
|
return; |
|
|
|
|
default: |
|
|
|
|
gpr_log(GPR_ERROR, "Closing acceptor. Failed accept4: %s", |
|
|
|
|
strerror(errno)); |
|
|
|
|
grpc_core::StrError(errno).c_str()); |
|
|
|
|
// Shutting down the acceptor. Unref the ref grabbed in
|
|
|
|
|
// AsyncConnectionAcceptor::Start().
|
|
|
|
|
Unref(); |
|
|
|
@ -189,15 +190,13 @@ void PosixEngineListenerImpl::AsyncConnectionAcceptor::NotifyOnAccept( |
|
|
|
|
auto listener_addr_uri = ResolvedAddressToURI(socket_.addr); |
|
|
|
|
gpr_log( |
|
|
|
|
GPR_ERROR, |
|
|
|
|
"Failed getpeername: %s. This is a critical failure, the " |
|
|
|
|
"listener on %s:%d is shutting down.", |
|
|
|
|
strerror(errno), |
|
|
|
|
"Failed getpeername: %s. Dropping the connection, and continuing " |
|
|
|
|
"to listen on %s:%d.", |
|
|
|
|
grpc_core::StrError(errno).c_str(), |
|
|
|
|
listener_addr_uri.ok() ? listener_addr_uri->c_str() : "<unknown>", |
|
|
|
|
socket_.port); |
|
|
|
|
close(fd); |
|
|
|
|
// Shutting down the acceptor. Unref the ref grabbed in
|
|
|
|
|
// AsyncConnectionAcceptor::Start().
|
|
|
|
|
Unref(); |
|
|
|
|
handle_->NotifyOnRead(notify_on_accept_); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
addr = EventEngine::ResolvedAddress(addr.address(), len); |
|
|
|
|