summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Core/ConnectionManager.cpp4
-rw-r--r--src/Net/Listener.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp
index 2b7c8d1..c7a2f42 100644
--- a/src/Core/ConnectionManager.cpp
+++ b/src/Core/ConnectionManager.cpp
@@ -92,10 +92,8 @@ void ConnectionManager::handleConnections(std::list<Net::ServerConnection*>& con
if((*con)->isConnected()) {
std::map<int,const short*>::iterator events = pollfdMap.find((*con)->getSocket());
- if(events != pollfdMap.end())
+ if(events != pollfdMap.end() && *events->second)
(*con)->sendReceive(*events->second);
- else
- (*con)->sendReceive();
++con;
}
diff --git a/src/Net/Listener.cpp b/src/Net/Listener.cpp
index 892d057..892ec9d 100644
--- a/src/Net/Listener.cpp
+++ b/src/Net/Listener.cpp
@@ -107,8 +107,10 @@ ServerConnection* Listener::getConnection(const std::map<int,const short*> &poll
for(std::list<ServerConnection*>::iterator con = connections.begin(); con != connections.end(); ++con) {
std::map<int,const short*>::const_iterator events = pollfdMap.find((*con)->getSocket());
- if(events != pollfdMap.end())
- (*con)->sendReceive(*events->second);
+ if(events != pollfdMap.end()) {
+ if(*events->second)
+ (*con)->sendReceive(*events->second);
+ }
else
(*con)->sendReceive();
}