summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-07-09 15:30:24 +0200
committerFlorent Le Coz <louiz@louiz.org>2015-07-09 15:30:24 +0200
commitece4b4969b296a3da010fb22768348650e70962d (patch)
treeea7151861b9b3c90b9cbb64410cbe1be8041eb77 /src
parentac6a74595c679c22ae13eca0609a745e431b339c (diff)
downloadbiboumi-ece4b4969b296a3da010fb22768348650e70962d.tar.gz
biboumi-ece4b4969b296a3da010fb22768348650e70962d.tar.bz2
biboumi-ece4b4969b296a3da010fb22768348650e70962d.tar.xz
biboumi-ece4b4969b296a3da010fb22768348650e70962d.zip
If hostname resolution fails, do not try all possible ports
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc_client.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index 905a336..4e8385c 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -72,6 +72,11 @@ void IrcClient::on_connection_failed(const std::string& reason)
{
this->bridge->send_xmpp_message(this->hostname, "",
"Connection failed: "s + reason);
+
+ if (this->hostname_resolution_failed)
+ while (!this->ports_to_try.empty())
+ this->ports_to_try.pop();
+
if (this->ports_to_try.empty())
{
// Send an error message for all room that the user wanted to join