aboutsummaryrefslogtreecommitdiff
path: root/src/network/connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/connection.h')
-rw-r--r--src/network/connection.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/connection.h b/src/network/connection.h
index 2dc6d4397..24cd4fe4a 100644
--- a/src/network/connection.h
+++ b/src/network/connection.h
@@ -809,6 +809,11 @@ protected:
void putEvent(ConnectionEvent &e);
void TriggerSend();
+
+ bool ConnectedToServer()
+ {
+ return getPeerNoEx(PEER_ID_SERVER) != nullptr;
+ }
private:
MutexedQueue<ConnectionEvent> m_event_queue;