Also, is there no way to not even acknowledge incoming connections after I've gotten one player connected?
Yes, you can just do:
def Connected(self, player, addr):
if len(self.players) < 2:
add the player...and do stuff
Once the player count reaches 2 the connection will be received but not processed. As far as not even receiving it goes, that would require some changes to the library.
7. These actions are followed by myserver.Pump() (the one causing the problems I think) >>> and connection.Pump and myclient.Pump(), with the myclient.Pump in a try/except block
Are you sure that the host acting as the server is not incorrectly acting as client too? I'm assuming you have that code in separate groups, etc (a server group and a client group).
Have you run wireshark to see what the packets look like right before the disconnect occurs?
When the server and client switch layouts there will be some desynchronization...the key is to get everybody synchronized again before starting processing events for the next layout.
You can also do some tests...make sure that the server has switched to Layout 2.. then wait 10 seconds and switch the client, etc... different stuff to be sure the server is ready to process packets in the second layout. Above that, I might have to see a .cap.