diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-09 04:39:28 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-09 04:39:28 +0200 |
commit | d8dda96481a9614b5d7550643f794a9831c6b474 (patch) | |
tree | 95eda609182d89068aea0b5a02b6ced4fe09da36 /src/Net | |
parent | f50844eb7f9772f865ce9f272eadb15943319885 (diff) | |
download | mad-d8dda96481a9614b5d7550643f794a9831c6b474.tar mad-d8dda96481a9614b5d7550643f794a9831c6b474.zip |
Rufe sendReceive() nur auf, wenn poll() f?r eine Verbindung erfolgreich war
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(); } |