ASF Bugzilla – Attachment 31698 Details for
Bug 56518
NIO async servlet limit latch leak
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix bug 56518 based on https://svn.apache.org/repos/asf/tomcat/trunk@1595293
bugfix-56518.diff (text/plain), 2.53 KB, created by
hanyong
on 2014-06-09 04:43:14 UTC
(
hide
)
Description:
fix bug 56518 based on https://svn.apache.org/repos/asf/tomcat/trunk@1595293
Filename:
MIME Type:
Creator:
hanyong
Created:
2014-06-09 04:43:14 UTC
Size:
2.53 KB
patch
obsolete
>diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java >index d0f399c..9ad0c7e 100644 >--- a/java/org/apache/tomcat/util/net/NioEndpoint.java >+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java >@@ -788,7 +788,8 @@ public class NioEndpoint extends AbstractEndpoint<NioChannel> { > public void run() { > if ( interestOps == OP_REGISTER ) { > try { >- socket.getIOChannel().register(socket.getPoller().getSelector(), SelectionKey.OP_READ, key); >+ SelectionKey sk = socket.getIOChannel().register(socket.getPoller().getSelector(), SelectionKey.OP_READ, key); >+ key.setKey(sk); > } catch (Exception x) { > log.error("", x); > } >@@ -1364,6 +1365,7 @@ public class NioEndpoint extends AbstractEndpoint<NioChannel> { > cometNotify = false; > interestOps = 0; > this.poller = poller; >+ this.key = null; > sendfileData = null; > if (readLatch != null) { > try { >@@ -1393,6 +1395,12 @@ public class NioEndpoint extends AbstractEndpoint<NioChannel> { > > public Poller getPoller() { return poller;} > public void setPoller(Poller poller){this.poller = poller;} >+ public SelectionKey getKey() { >+ return key; >+ } >+ public void setKey(SelectionKey key) { >+ this.key = key; >+ } > public void setCometNotify(boolean notify) { this.cometNotify = notify; } > public boolean getCometNotify() { return cometNotify; } > public int interestOps() { return interestOps;} >@@ -1434,6 +1442,7 @@ public class NioEndpoint extends AbstractEndpoint<NioChannel> { > public long getWriteTimeout() {return this.writeTimeout;} > > private Poller poller = null; >+ private SelectionKey key = null; > private int interestOps = 0; > private boolean cometNotify = false; > private CountDownLatch readLatch = null; >@@ -1507,8 +1516,7 @@ public class NioEndpoint extends AbstractEndpoint<NioChannel> { > @Override > public void run() { > NioChannel socket = ka.getSocket(); >- SelectionKey key = socket.getIOChannel().keyFor( >- socket.getPoller().getSelector()); >+ SelectionKey key = ka.getKey(); > > // Upgraded connections need to allow multiple threads to access the > // connection at the same time to enable blocking IO to be used when
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56518
:
31613
|
31614
|
31690
|
31691
| 31698 |
31703