diff options
Diffstat (limited to 'src/Net')
-rw-r--r-- | src/Net/Listener.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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(); } |