@@ -154,8 +154,11 @@ private List<IdleChannel> expiredChannels(ConcurrentLinkedDeque<IdleChannel> par
154154// lazy create
155155List <IdleChannel >idleTimeoutChannels =null ;
156156for (IdleChannel idleChannel :partition ) {
157- if (isIdleTimeoutExpired (idleChannel ,now ) ||isRemotelyClosed (idleChannel .channel ) ||isTtlExpired (idleChannel .channel ,now )) {
158- LOGGER .debug ("Adding Candidate expired Channel {}" ,idleChannel .channel );
157+ boolean isIdleTimeoutExpired =isIdleTimeoutExpired (idleChannel ,now );
158+ boolean isRemotelyClosed =isRemotelyClosed (idleChannel .channel );
159+ boolean isTtlExpired =isTtlExpired (idleChannel .channel ,now );
160+ if (isIdleTimeoutExpired ||isRemotelyClosed ||isTtlExpired ) {
161+ LOGGER .debug ("Adding Candidate expired Channel {} isIdleTimeoutExpired={} isRemotelyClosed={} isTtlExpired={}" ,idleChannel .channel ,isIdleTimeoutExpired ,isRemotelyClosed ,isTtlExpired );
159162if (idleTimeoutChannels ==null )
160163idleTimeoutChannels =new ArrayList <>(1 );
161164idleTimeoutChannels .add (idleChannel );
@@ -199,7 +202,10 @@ public void run(Timeout timeout) throws Exception {
199202
200203if (LOGGER .isDebugEnabled ())
201204for (Object key :partitions .keySet ()) {
202- LOGGER .debug ("Entry count for : {} : {}" ,key ,partitions .get (key ).size ());
205+ int size =partitions .get (key ).size ();
206+ if (size >0 ) {
207+ LOGGER .debug ("Entry count for : {} : {}" ,key ,size );
208+ }
203209 }
204210
205211long start =unpreciseMillisTime ();
@@ -228,7 +234,9 @@ public void run(Timeout timeout) throws Exception {
228234
229235if (LOGGER .isDebugEnabled ()) {
230236long duration =unpreciseMillisTime () -start ;
231- LOGGER .debug ("Closed {} connections out of {} in {} ms" ,closedCount ,totalCount ,duration );
237+ if (closedCount >0 ) {
238+ LOGGER .debug ("Closed {} connections out of {} in {} ms" ,closedCount ,totalCount ,duration );
239+ }
232240 }
233241
234242scheduleNewIdleChannelDetector (timeout .task ());