Cloud storage: check connection before connecting

libgit2 takes forever (a minute or so) to figure out that it can't connect
to a remote server.
So if we are using https as connection protocol, quickly check utilizing
RFCs 2324/7168 to make sure we can reach the cloud server (and not some
captive portal or something).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-12 06:31:16 -07:00
parent 5e0c546beb
commit 4d06e8f7b5
4 changed files with 61 additions and 1 deletions

View file

@ -129,6 +129,13 @@ private:
};
class CheckCloudConnection : public QObject {
Q_OBJECT
public:
explicit CheckCloudConnection(QObject *parent = 0);
static bool checkServer();
};
#ifdef __cplusplus
extern "C" {
#endif