Fixes #335836 (Race when updating SelectChannelEndPoint._dispatched)
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2714 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
caff41bebb
commit
813d652e41
|
@ -31,6 +31,7 @@ jetty-7.3.0-SNAPSHOT
|
|||
+ 335361 Fixed 'jetty.sh check' to show current PID when JETTY_PID env. variable is set
|
||||
+ 335641 Cleaned up dispatch handling to avoid key.interestOps==0 when undispatched
|
||||
+ 335681 Improve ChannelEndPoint.close() to avoid spinning
|
||||
+ 335836 Race when updating SelectChannelEndPoint._dispatched
|
||||
|
||||
jetty-7.2.2.v20101205 5 December 2010
|
||||
+ JETTY-1308 327109 (re)fixed AJP handling of empty packets
|
||||
|
|
|
@ -191,9 +191,11 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
}
|
||||
else
|
||||
{
|
||||
_dispatched = _manager.dispatch(_handler);
|
||||
if(!_dispatched)
|
||||
_dispatched = true;
|
||||
boolean dispatched = _manager.dispatch(_handler);
|
||||
if(!dispatched)
|
||||
{
|
||||
_dispatched = false;
|
||||
Log.warn("Dispatched Failed!");
|
||||
updateKey();
|
||||
}
|
||||
|
@ -208,7 +210,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
* @return If false is returned, the endpoint has been redispatched and
|
||||
* thread must keep handling the endpoint.
|
||||
*/
|
||||
private boolean undispatch()
|
||||
protected boolean undispatch()
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
|
@ -501,7 +503,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
*/
|
||||
private void handle()
|
||||
protected void handle()
|
||||
{
|
||||
boolean dispatched=true;
|
||||
try
|
||||
|
@ -588,7 +590,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
{
|
||||
synchronized(this)
|
||||
{
|
||||
return "SCEP@" + hashCode() + "\t[d=" + _dispatched + ",io=" + _interestOps+
|
||||
return "SCEP@" + hashCode() + " [d=" + _dispatched + ",io=" + _interestOps+
|
||||
",w=" + _writable + ",rb=" + _readBlocked + ",wb=" + _writeBlocked + "]";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue