From d8dda96481a9614b5d7550643f794a9831c6b474 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 9 Sep 2008 04:39:28 +0200 Subject: Rufe sendReceive() nur auf, wenn poll() f?r eine Verbindung erfolgreich war --- src/Net/Listener.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Net') 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 &poll for(std::list::iterator con = connections.begin(); con != connections.end(); ++con) { std::map::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(); } -- cgit v1.2.3