diff options
Diffstat (limited to 'cpp/src/qpid/broker/RetryList.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/RetryList.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cpp/src/qpid/broker/RetryList.cpp b/cpp/src/qpid/broker/RetryList.cpp index 8f600c086d..b0477dd0f7 100644 --- a/cpp/src/qpid/broker/RetryList.cpp +++ b/cpp/src/qpid/broker/RetryList.cpp @@ -31,20 +31,16 @@ void RetryList::reset(const std::vector<Url>& u) urlIndex = addressIndex = 0;//reset indices } -bool RetryList::next(TcpAddress& address) +bool RetryList::next(Address& address) { while (urlIndex < urls.size()) { - while (addressIndex < urls[urlIndex].size()) { - const TcpAddress* tcp = urls[urlIndex][addressIndex++].get<TcpAddress>(); - if (tcp) { - address = *tcp; - return true; - } + if (addressIndex < urls[urlIndex].size()) { + address = urls[urlIndex][addressIndex++]; + return true; } urlIndex++; addressIndex = 0; } - urlIndex = addressIndex = 0;//reset indices return false; } |
