network: Fix for not adding connected socket if it was disconnected
authorJerome St-Louis <jerome@ecere.com>
Sat, 23 Feb 2013 22:31:38 +0000 (17:31 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sat, 23 Feb 2013 22:31:38 +0000 (17:31 -0500)
ecere/src/gui/GuiApplication.ec

index 8c66fc5..f41d366 100644 (file)
@@ -1011,7 +1011,8 @@ public:
                         // printf("Calling OnConnect on %s\n", socket._class.name);
                         socket.OnConnect();
                         network.mutex.Wait();
-                        network.sockets.Add(socket);
+                        if(socket._connected)
+                           network.sockets.Add(socket);
                      }
                      gotEvent |= true;
                      goOn = true;