mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-20 08:38:40 +02:00
Settings: offline mode
This commit is contained in:
+5
-1
@@ -238,7 +238,11 @@ bool xdgDesktopEntryRegister() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool portOpen(const QString &hostname, quint16 port){
|
||||
bool portOpen(const QString &hostname, quint16 port) { // TODO: this call should be async
|
||||
if (config()->get(Config::offlineMode).toBool()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(hostname, port);
|
||||
return socket.waitForConnected(600);
|
||||
|
||||
Reference in New Issue
Block a user