Properly check for connecting or connected status before reconnecting

Note, in our context, is_connecting() includes the resolving part as well as
the actual connection (if we are using c-ares)

fix #3048
This commit is contained in:
Florent Le Coz
2015-04-21 15:38:22 +02:00
parent d79850f984
commit a8225dc54c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -55,8 +55,8 @@ IrcClient::~IrcClient()
void IrcClient::start()
{
if (this->connected || this->connecting)
return ;
if (this->is_connecting() || this->is_connected())
return;
std::string port;
bool tls;
std::tie(port, tls) = this->ports_to_try.top();