functioner commented on a change in pull request #3719:
URL: https://github.com/apache/hadoop/pull/3719#discussion_r758649585
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
##########
@@ -1536,9 +1536,19 @@ void doAccept(SelectionKey key) throws
InterruptedException, IOException, OutOf
SocketChannel channel;
while ((channel = server.accept()) != null) {
- channel.configureBlocking(false);
- channel.socket().setTcpNoDelay(tcpNoDelay);
- channel.socket().setKeepAlive(true);
+ try {
+ channel.configureBlocking(false);
+ channel.socket().setTcpNoDelay(tcpNoDelay);
+ channel.socket().setKeepAlive(true);
+ } catch (IOException e) {
+ LOG.warn("Error in an accepted SocketChannel", e);
+ try {
+ channel.socket().close();
+ channel.close();
+ } catch (IOException ignored) {
Review comment:
I've added the log in a new commit. Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]