mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-04 21:09:13 +00:00
Jetty9 - Prevented NPE in case the connection cannot be created.
This commit is contained in:
parent
d40170001a
commit
cac1c933c3
@ -233,7 +233,7 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
||||
* @param endpoint the endpoint
|
||||
* @param attachment the attachment
|
||||
* @return a new connection
|
||||
* @throws IOException
|
||||
* @throws IOException
|
||||
* @see #newEndPoint(SocketChannel, ManagedSelector, SelectionKey)
|
||||
*/
|
||||
public abstract Connection newConnection(SocketChannel channel, EndPoint endpoint, Object attachment) throws IOException;
|
||||
@ -496,7 +496,9 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
||||
public void destroyEndPoint(EndPoint endPoint)
|
||||
{
|
||||
LOG.debug("Destroyed {}", endPoint);
|
||||
connectionClosed(endPoint.getConnection());
|
||||
Connection connection = endPoint.getConnection();
|
||||
if (connection != null)
|
||||
connectionClosed(connection);
|
||||
endPointClosed(endPoint);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user