Created
March 31, 2018 11:17
-
-
Save Kirek/d073372ab5e310b68abcfa0c2ee1c4b5 to your computer and use it in GitHub Desktop.
qt5boxit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/boxit/src/boxit/main.cpp b/boxit/src/boxit/main.cpp | |
index 8ce90a0..60a33ab 100644 | |
--- a/boxit/src/boxit/main.cpp | |
+++ b/boxit/src/boxit/main.cpp | |
@@ -40,6 +40,7 @@ | |
#include <QFileInfo> | |
#include <QMap> | |
#include <QProcess> | |
+#include <QTimer> | |
#include <dbusclient.h> | |
#include "boxitsocket.h" | |
@@ -2160,7 +2161,20 @@ bool uploadData(const QString path, const int currentIndex, const int maxIndex) | |
bool listenOnStatus(bool exitOnSessionEnd) { | |
- TimeOutReset timeOutReset(&boxitSocket); | |
+ | |
+ | |
+ //TimeOutReset timeOutReset(&boxitSocket); | |
+ QTimer timer; | |
+ QObject::connect(&timer, &QTimer::timeout, | |
+ [=]( ) { | |
+ if (boxitSocket.state() != QAbstractSocket::ConnectedState) { | |
+ cerr << "info: timeout, everythin is fine"; | |
+ return; | |
+ } | |
+ cerr << "info: timeout, is timing out!"; | |
+ boxitSocket.sendData(MSG_RESET_TIMEOUT); } | |
+ ); | |
+ | |
QString host = ""; | |
if (!connectAndLoginToHost(host)) | |
@@ -2175,7 +2189,8 @@ bool listenOnStatus(bool exitOnSessionEnd) { | |
} | |
// Start our reset timeout timer | |
- timeOutReset.start(); | |
+ //timeOutReset.start(); | |
+ timer.start(10000); | |
bool firstBranch = true; | |
bool firstRepo = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment