summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-27 22:08:47 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-27 22:08:47 (GMT)
commitd64d480cae2db95a802323408745b0d49be9c660 (patch)
treeeebc3609eb05a8dbd0c209948b7be6a06dddfe9d
parent08d137d71e23d8237e788750bd32ad5901058031 (diff)
downloadswift-d64d480cae2db95a802323408745b0d49be9c660.zip
swift-d64d480cae2db95a802323408745b0d49be9c660.tar.bz2
Removing 'force quit' timer.
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/pipe_select_interrupter.ipp12
-rw-r--r--Swift/Controllers/MainController.cpp12
-rw-r--r--Swift/Controllers/MainController.h1
3 files changed, 10 insertions, 15 deletions
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_;