diff options
author | Michael Vogt <mvo@debian.org> | 2016-01-05 20:49:19 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2016-01-05 20:49:19 +0100 |
commit | 0b7d34ee9dd467b23835377f911af47019d8f713 (patch) | |
tree | 015ec490a521cb53ca6363762d04d6859bdd0647 /methods | |
parent | ca5cbc96a5a297fb41c973c93f2089ac058a08eb (diff) |
Do not remove a not working SrvRecords server twice
The PopFromSrvRecs() already removed the entry from the active
list, so the extra SrvRecords.erase() was incorrect.
Git-Dch: ignore
Diffstat (limited to 'methods')
-rw-r--r-- | methods/connect.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/methods/connect.cc b/methods/connect.cc index cdd97994c..07a730b88 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -288,12 +288,10 @@ bool Connect(std::string Host,int Port,const char *Service, // try to connect in the priority order of the srv records while(SrvRecords.size() > 0) { + // PopFromSrvRecs will also remove the server Host = PopFromSrvRecs(SrvRecords).target; if(ConnectToHostname(Host, Port, Service, DefPort, Fd, TimeOut, Owner)) return true; - - // we couldn't connect to this one, use the next - SrvRecords.erase(SrvRecords.begin()); } return false; |