summaryrefslogtreecommitdiffstats
path: root/src/Core
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-06-27 12:48:28 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-06-27 12:48:28 +0200
commitb143406a05a1698df5b88b0d4298362a9c8c080b (patch)
treeeccf462dcc655073ae6833107fdecc8b5e22bf73 /src/Core
parent86c1806046dea0bf7c2525d0aa591cdae9b3d330 (diff)
downloadmad-b143406a05a1698df5b88b0d4298362a9c8c080b.tar
mad-b143406a05a1698df5b88b0d4298362a9c8c080b.zip
Korrekte Behandlung des Poll-Timeouts
Diffstat (limited to 'src/Core')
-rw-r--r--src/Core/ConnectionManager.cpp2
-rw-r--r--src/Core/ConnectionManager.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp
index ba78a98..b338f62 100644
--- a/src/Core/ConnectionManager.cpp
+++ b/src/Core/ConnectionManager.cpp
@@ -90,6 +90,8 @@ ConnectionManager::ConnectionManager() {
catch(Net::Exception &e) {
// TODO: Log error
}
+
+ refreshPollfds();
}
ConnectionManager::~ConnectionManager() {
diff --git a/src/Core/ConnectionManager.h b/src/Core/ConnectionManager.h
index b252910..cbfc812 100644
--- a/src/Core/ConnectionManager.h
+++ b/src/Core/ConnectionManager.h
@@ -59,8 +59,8 @@ class ConnectionManager {
ConnectionManager();
virtual ~ConnectionManager();
- void wait(int timeout) {
- poll(pollfds.data(), pollfds.size(), timeout);
+ bool wait(int timeout) {
+ return (poll(pollfds.data(), pollfds.size(), timeout) > 0);
}
void run();