method buildBackups should bail out early in the transport is stopped.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1370581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-08-07 22:50:26 +00:00
parent b6e82fec92
commit ca15308b3f
1 changed files with 1 additions and 1 deletions

View File

@ -1149,7 +1149,7 @@ public class FailoverTransport implements CompositeTransport {
} }
backups.removeAll(disposedList); backups.removeAll(disposedList);
disposedList.clear(); disposedList.clear();
for (Iterator<URI> iter = backupList.iterator(); iter.hasNext() && backups.size() < backupPoolSize; ) { for (Iterator<URI> iter = backupList.iterator(); !disposed && iter.hasNext() && backups.size() < backupPoolSize; ) {
URI uri = iter.next(); URI uri = iter.next();
if (connectedTransportURI != null && !connectedTransportURI.equals(uri)) { if (connectedTransportURI != null && !connectedTransportURI.equals(uri)) {
try { try {