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 c4787f4 Code cleanup
c4787f4 is described below
commit c4787f4289b9216217c34cb02f81d74d9daabd2b
Author: remm <[email protected]>
AuthorDate: Thu Oct 22 14:09:17 2020 +0200
Code cleanup
---
java/org/apache/tomcat/util/net/NioEndpoint.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index eaf7efe..1f1a8c8 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -683,13 +683,11 @@ public class NioEndpoint extends
AbstractJsseEndpoint<NioChannel,SocketChannel>
// any active event.
while (iterator != null && iterator.hasNext()) {
SelectionKey sk = iterator.next();
+ iterator.remove();
NioSocketWrapper socketWrapper = (NioSocketWrapper)
sk.attachment();
// Attachment may be null if another thread has called
// cancelledKey()
- if (socketWrapper == null) {
- iterator.remove();
- } else {
- iterator.remove();
+ if (socketWrapper != null) {
processKey(sk, socketWrapper);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]