Client idle connection uses onIdleExpired rather than close
This commit is contained in:
parent
d55477388b
commit
6cb2d13abd
|
@ -439,14 +439,7 @@ public class HttpDestination implements Dumpable
|
|||
|
||||
public void returnIdleConnection(AbstractHttpConnection connection)
|
||||
{
|
||||
try
|
||||
{
|
||||
connection.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOG.ignore(e);
|
||||
}
|
||||
connection.onIdleExpired();
|
||||
|
||||
boolean startConnection = false;
|
||||
synchronized (this)
|
||||
|
|
|
@ -30,12 +30,4 @@ public class ExternalKeyStoreAsyncSslHttpExchangeTest extends SslHttpExchangeTes
|
|||
_httpClient = serverAndClientCreator.createClient(3000L,3500L,2000);
|
||||
_port = _server.getConnectors()[0].getLocalPort();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testBigPostWithContentExchange() throws Exception
|
||||
{
|
||||
super.testBigPostWithContentExchange();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -205,8 +205,6 @@ public class ChannelEndPoint implements EndPoint
|
|||
public void close() throws IOException
|
||||
{
|
||||
LOG.debug("close {}",this);
|
||||
|
||||
// System.err.println("CLOSE "+_socket);
|
||||
_channel.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -274,11 +274,11 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
{
|
||||
long idleTimestamp=_idleTimestamp;
|
||||
if (!getChannel().isOpen() || idleTimestamp!=0 && _maxIdleTime>0 && now>(idleTimestamp+_maxIdleTime))
|
||||
idleExpired();
|
||||
onIdleExpired();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
protected void idleExpired()
|
||||
protected void onIdleExpired()
|
||||
{
|
||||
_connection.onIdleExpired();
|
||||
}
|
||||
|
|
|
@ -361,7 +361,6 @@ public class SelectChannelEndPointTest
|
|||
assertEquals(0xff&b0,b);
|
||||
}
|
||||
latch.countDown();
|
||||
Thread.yield();
|
||||
}
|
||||
}
|
||||
catch(ThreadDeath t)
|
||||
|
|
|
@ -369,24 +369,6 @@ public abstract class AbstractHttpConnection extends AbstractConnection
|
|||
return _generator.isCommitted();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public final void scheduleTimeout(Timeout.Task task, long timeoutMs)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public final void cancelTimeout(Timeout.Task task)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public void reset()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue