Index: code/branches/network3/src/network/ClientConnection.cc
===================================================================
--- code/branches/network3/src/network/ClientConnection.cc	(revision 1253)
+++ code/branches/network3/src/network/ClientConnection.cc	(revision 1261)
@@ -112,6 +112,6 @@
     if(server==NULL)
       return false;
-    if(!packet){
-      COUT(4) << "Cl.con: addpacket: invalid packet" << std::endl;
+    if(packet==NULL){
+      COUT(3) << "Cl.con: addpacket: invalid packet" << std::endl;
       return false;
     }
Index: code/branches/network3/src/network/ClientConnection.h
===================================================================
--- code/branches/network3/src/network/ClientConnection.h	(revision 1253)
+++ code/branches/network3/src/network/ClientConnection.h	(revision 1261)
@@ -53,5 +53,5 @@
 #define NETWORK_PORT 55556
 #define NETWORK_CLIENT_MAX_CONNECTIONS 5
-#define NETWORK_CLIENT_TIMEOUT 10
+#define NETWORK_CLIENT_TIMEOUT 100
 #define NETWORK_SEND_WAIT 5
 #define NETWORK_CLIENT_CHANNELS 2
Index: code/branches/network3/src/network/ClientInformation.h
===================================================================
--- code/branches/network3/src/network/ClientInformation.h	(revision 1253)
+++ code/branches/network3/src/network/ClientInformation.h	(revision 1261)
@@ -92,4 +92,5 @@
 
     bool head;
+    unsigned short failures_;
 
   private:
Index: code/branches/network3/src/network/ConnectionManager.cc
===================================================================
--- code/branches/network3/src/network/ConnectionManager.cc	(revision 1253)
+++ code/branches/network3/src/network/ConnectionManager.cc	(revision 1261)
@@ -191,5 +191,7 @@
           //std::cout << "received data" << std::endl;
           COUT(5) << "Con.Man: receive event has occured" << std::endl;
-          processData(event);
+          // only add, if client has connected yet and not been disconnected
+          if(head_->findClient(&event->peer->address))
+            processData(event);
           break;
         case ENET_EVENT_TYPE_DISCONNECT:
@@ -354,8 +356,24 @@
   }
   
+  bool ConnectionManager::removeShip(ClientInformation *client){
+    int id=client->getShipID();
+    orxonox::Iterator<orxonox::SpaceShip> it;
+    for(it = orxonox::ObjectList<orxonox::SpaceShip>::start(); it; ++it){
+      if(it->objectID!=id)
+        continue;
+      delete *it;
+    }
+    return true;
+  }
+  
   bool ConnectionManager::sendWelcome(int clientID, int shipID, bool allowed){
     addPacket(packet_gen.generateWelcome(clientID, shipID, allowed),clientID);
     sendPackets();
     return true;
+  }
+  
+  void ConnectionManager::disconnectClient(ClientInformation *client){
+    enet_peer_disconnect(client->getPeer(), 0);
+    removeShip(client);
   }
   
Index: code/branches/network3/src/network/ConnectionManager.h
===================================================================
--- code/branches/network3/src/network/ConnectionManager.h	(revision 1253)
+++ code/branches/network3/src/network/ConnectionManager.h	(revision 1261)
@@ -86,4 +86,5 @@
     bool sendPackets();
     bool createClient(int clientID);
+    void disconnectClient(ClientInformation *client);
 
   private:
@@ -99,4 +100,5 @@
     ENetPeer *getClientPeer(int clientID);
     bool createShip(ClientInformation *client);
+    bool removeShip(ClientInformation *client);
     bool sendWelcome(int clientID, int shipID, bool allowed);
     bool addFakeConnectRequest(ENetEvent *ev);
Index: code/branches/network3/src/network/GameStateManager.cc
===================================================================
--- code/branches/network3/src/network/GameStateManager.cc	(revision 1253)
+++ code/branches/network3/src/network/GameStateManager.cc	(revision 1261)
@@ -449,4 +449,9 @@
     return true; // TODO: change this
   }
+  
+  void GameStateManager::removeClient(ClientInformation* client){
+    gameStateUsed[client->getGamestateID()]--;
+    head_->removeClient(client->getID());
+  }
 
 }
Index: code/branches/network3/src/network/GameStateManager.h
===================================================================
--- code/branches/network3/src/network/GameStateManager.h	(revision 1253)
+++ code/branches/network3/src/network/GameStateManager.h	(revision 1261)
@@ -76,4 +76,5 @@
     bool pushGameState(GameStateCompressed *gs, int clientID);
     void ackGameState(int clientID, int gamestateID);
+    void removeClient(ClientInformation *client);
   private:
     void cleanup(); // "garbage handler"
Index: code/branches/network3/src/network/Server.cc
===================================================================
--- code/branches/network3/src/network/Server.cc	(revision 1253)
+++ code/branches/network3/src/network/Server.cc	(revision 1261)
@@ -53,4 +53,9 @@
 namespace network
 {
+  
+  
+#define MAX_FAILURES 20;
+  
+  
   /**
   * Constructor for default values (bindaddress is set to ENET_HOST_ANY
@@ -205,7 +210,11 @@
       }
       //std::cout << "adding gamestate" << std::endl;
-      if ( !(connection->addPacket(packet_gen.gstate(gs), cid)) )
-        COUT(4) << "Server: packet with client id (cid): " << cid << " not sended" << std::endl; 
+      if ( !(connection->addPacket(packet_gen.gstate(gs), cid)) ){
+        COUT(3) << "Server: packet with client id (cid): " << cid << " not sended: " << temp->failures_ << std::endl; 
+        temp->failures_++;
+        if(temp->failures_ > 20 )
+          disconnectClient(temp);
       //std::cout << "added gamestate" << std::endl;
+      }
       added=true;
       temp=temp->next();
@@ -240,5 +249,16 @@
     if(!gamestates->pushGameState(data, clientID))
         COUT(3) << "Could not push gamestate\t\t\t\t=====" << std::endl;
-  }
-
+    else
+        clients->findClient(clientID)->failures_=0;
+  }
+
+  void Server::disconnectClient(int clientID){
+    ClientInformation *client = clients->findClient(clientID);
+    disconnectClient(client);
+  }
+  void Server::disconnectClient( ClientInformation *client){
+    connection->disconnectClient(client);
+    gamestates->removeClient(client);
+  }
+  
 }
Index: code/branches/network3/src/network/Server.h
===================================================================
--- code/branches/network3/src/network/Server.h	(revision 1253)
+++ code/branches/network3/src/network/Server.h	(revision 1261)
@@ -71,4 +71,6 @@
     void updateGamestate();
   private:
+    void disconnectClient(int clientID);
+    void disconnectClient( ClientInformation *client);
     bool sendGameState();
     void processAck( ack *data, int clientID);
