jetty-9: Removed TODOs.

This commit is contained in:
Simone Bordet 2012-09-21 17:24:45 +02:00
parent 9e7fcf4fee
commit ab2757ab96
2 changed files with 11 additions and 4 deletions

View File

@ -218,7 +218,11 @@ public class HttpDestination implements Destination, AutoCloseable, Dumpable
if (requestPair == null)
{
LOG.debug("{} idle", connection);
idleConnections.offer(connection); // TODO: check return value ?
if (!idleConnections.offer(connection))
{
LOG.debug("{} idle overflow");
connection.close();
}
if (!client.isRunning())
{
LOG.debug("{} is stopping", client);
@ -229,7 +233,10 @@ public class HttpDestination implements Destination, AutoCloseable, Dumpable
else
{
LOG.debug("{} active", connection);
activeConnections.offer(connection); // TODO: check return value ?
if (!activeConnections.offer(connection))
{
LOG.warn("{} active overflow");
}
if (dispatch)
{
client.getExecutor().execute(new Runnable()

View File

@ -114,13 +114,13 @@ public class RedirectProtocolHandler extends Response.Listener.Empty implements
++redirects;
conversation.setAttribute(ATTRIBUTE, redirects);
// TODO: no, reuse the same request object, just have a setter for the URI
Request redirect = client.newRequest(request.id(), location);
// Use given method
redirect.method(method);
redirect.version(request.version());
// Copy headers
for (HttpFields.Field header : request.headers())
redirect.header(header.getName(), header.getValue());