This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 4d70251 Improve check
4d70251 is described below
commit 4d7025103102bb6b56d819fabda408be05774e9b
Author: remm <[email protected]>
AuthorDate: Tue Mar 17 15:04:59 2020 +0100
Improve check
There's only one poller now, so if it's null on stop no need to get the
key as it will close the channel.
---
java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 6897551..f753b9a 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1525,12 +1525,12 @@ public class NioEndpoint extends
AbstractJsseEndpoint<NioChannel,SocketChannel>
@Override
protected void doRun() {
NioChannel socket = socketWrapper.getSocket();
- SelectionKey key =
socket.getIOChannel().keyFor(socket.getSocketWrapper().getPoller().getSelector());
Poller poller = NioEndpoint.this.poller;
if (poller == null) {
socketWrapper.close();
return;
}
+ SelectionKey key =
socket.getIOChannel().keyFor(poller.getSelector());
try {
int handshake = -1;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]