Avoid reading field twice (may lead to spurious NPEs).
This commit is contained in:
parent
386249f504
commit
ffdcfa5dde
|
@ -455,7 +455,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see org.eclipse.jetty.io.AsyncEndPoint#scheduleWrite()
|
||||
|
@ -687,14 +687,15 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
{
|
||||
try
|
||||
{
|
||||
if (_key!=null)
|
||||
_key.cancel();
|
||||
SelectionKey key = _key;
|
||||
if (key!=null)
|
||||
key.cancel();
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
LOG.ignore(e);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
super.close();
|
||||
|
|
Loading…
Reference in New Issue