From f978788a2c8844a24d2481c4d70b1bb5a152d1fb Mon Sep 17 00:00:00 2001
From: Thanos Doukoudakis <thanos.doukoudakis@isode.com>
Date: Mon, 8 Jan 2018 18:08:01 +0000
Subject: Add an log assertion to Connectors

This will check that the connection object is valid when a connector
timeouts, and if not log it.

Test-Information:
None

Change-Id: I0af3e88fe1f527c25c4bb6c886668d19167b489b

diff --git a/Swiften/Network/Connector.cpp b/Swiften/Network/Connector.cpp
index 457d8a9..e86b327 100644
--- a/Swiften/Network/Connector.cpp
+++ b/Swiften/Network/Connector.cpp
@@ -189,6 +189,7 @@ void Connector::finish(std::shared_ptr<Connection> connection) {
 
 void Connector::handleTimeout() {
     SWIFT_LOG(debug) << "Timeout" << std::endl;
+    SWIFT_LOG_ASSERT(currentConnection, error) << "Connection not valid but triggered a timeout" <<std::endl;
     handleConnectionConnectFinished(true);
 }
 
-- 
cgit v0.10.2-6-g49f6