Avoid reading field twice (may lead to spurious NPEs).

This commit is contained in:
Simone Bordet 2012-03-06 18:09:58 +01:00
parent 386249f504
commit ffdcfa5dde
1 changed files with 5 additions and 4 deletions

View File

@ -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();