// make sure the connection isn't reaped through inactivity
// while there are proxies associated with it.
for (int i = 0; i < 10; ++i) {
Runtime.getRuntime().gc();
if (latch.attempt(1000)) {
break;
}
}
if (latch.attempt(0)) {
fail("Connection terminated when there were active proxies");