for (Map.Entry<Integer, IClientStream> entry : streams.entrySet()) {
IClientStream stream = entry.getValue();
if (stream != null) {
if (log.isDebugEnabled())
log.debug("Closing stream: {}", stream.getStreamId());
streamService.deleteStream(this, stream.getStreamId());
usedStreams.decrementAndGet();
}
}
} else {
if (log.isDebugEnabled())