From d64d480cae2db95a802323408745b0d49be9c660 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Mon, 27 Dec 2010 23:08:47 +0100
Subject: Removing 'force quit' timer.


diff --git a/3rdParty/Boost/src/boost/asio/detail/impl/pipe_select_interrupter.ipp b/3rdParty/Boost/src/boost/asio/detail/impl/pipe_select_interrupter.ipp
index f2a7291..5ed0d9d 100644
--- a/3rdParty/Boost/src/boost/asio/detail/impl/pipe_select_interrupter.ipp
+++ b/3rdParty/Boost/src/boost/asio/detail/impl/pipe_select_interrupter.ipp
@@ -29,6 +29,7 @@
 #include <boost/asio/detail/pipe_select_interrupter.hpp>
 #include <boost/asio/detail/throw_error.hpp>
 #include <boost/asio/error.hpp>
+#include <iostream>
 
 #include <boost/asio/detail/push_options.hpp>
 
@@ -56,10 +57,17 @@ pipe_select_interrupter::pipe_select_interrupter()
 
 pipe_select_interrupter::~pipe_select_interrupter()
 {
-  if (read_descriptor_ != -1)
+	std::cout << "Destroying pipe select interrupter" << std::endl;
+  if (read_descriptor_ != -1) {
+		std::cout << "Close read" << std::endl;
     ::close(read_descriptor_);
-  if (write_descriptor_ != -1)
+		std::cout << "Done close read" << std::endl;
+	}
+  if (write_descriptor_ != -1) {
+		std::cout << "Close write" << std::endl;
     ::close(write_descriptor_);
+		std::cout << "Done close write" << std::endl;
+	}
 }
 
 void pipe_select_interrupter::interrupt()
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 8a3dd96..bc40f95 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -559,9 +559,6 @@ void MainController::handleNotificationClicked(const JID& jid) {
 void MainController::handleQuitRequest() {
 	if (client_ && client_->isActive()) {
 		quitRequested_ = true;
-		quitTimer_ = networkFactories_->getTimerFactory()->createTimer(SecondsToWaitBeforeForceQuitting * 1000);
-		quitTimer_->onTick.connect(boost::bind(&MainController::handleForceQuit, this));
-		quitTimer_->start();
 		client_->disconnect();
 	}
 	else {
@@ -570,13 +567,4 @@ void MainController::handleQuitRequest() {
 	}
 }
 
-void MainController::handleForceQuit() {
-	/*
-	delete client_;
-	client_ = NULL;*/
-	handleQuitRequest();
-}
-
-const int MainController::SecondsToWaitBeforeForceQuitting = 20;
-
 }
diff --git a/Swift/Controllers/MainController.h b/Swift/Controllers/MainController.h
index b74b1ee..900319e 100644
--- a/Swift/Controllers/MainController.h
+++ b/Swift/Controllers/MainController.h
@@ -144,7 +144,6 @@ namespace Swift {
 			UserSearchController* userSearchControllerAdd_;
 			int timeBeforeNextReconnect_;
 			Timer::ref reconnectTimer_;
-			Timer::ref quitTimer_;
 			StatusTracker* statusTracker_;
 			bool myStatusLooksOnline_;
 			bool quitRequested_;
-- 
cgit v0.10.2-6-g49f6