summaryrefslogtreecommitdiff
path: root/src/net/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/connection.cpp')
-rw-r--r--src/net/connection.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/connection.cpp b/src/net/connection.cpp
index caaa0ce1..a016e07a 100644
--- a/src/net/connection.cpp
+++ b/src/net/connection.cpp
@@ -67,6 +67,14 @@ bool Net::Connection::connect(const std::string &address, short port)
return false;
}
+ ENetEvent event;
+ if (enet_host_service(mClient, &event, 10000) <= 0 ||
+ event.type != ENET_EVENT_TYPE_CONNECT)
+ {
+ logger->log("Well....");
+ return false;
+ }
+
return true;
}