You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/10/22 12:11:20 UTC
[tomcat] branch 8.5.x updated: Code cleanup
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new efa937d Code cleanup
efa937d is described below
commit efa937d2d95320ffd9e958703b6c9433dc259bdb
Author: remm <re...@apache.org>
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 9b8c281..08b8a4e 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -865,13 +865,11 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel> {
// 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org