SMRT-WSU / cards

GNU General Public License v3.0
4 stars 1 forks source link

Game server closes #7

Closed Luckyme66 closed 5 years ago

Luckyme66 commented 5 years ago

When four connections are made, the server tops listening: for new connections or for messages from the old ones. It stops sending as well. I just shuts down.

incarnadined commented 5 years ago

are you saying this is a problem?

Luckyme66 commented 5 years ago

I know, but it doesn't allow the four to then talk to it.

incarnadined commented 5 years ago

In my chat app, 4 can connect and talk fine

Luckyme66 commented 5 years ago

Yeah, it's because I changed some stuff

Luckyme66 commented 5 years ago

If you run it in powershell instead of the python terminal, then it doesn't end the script but the '4players' message still doesn't send.

incarnadined commented 5 years ago

Looking at the gameserver code now, I feel like I can see multiple errors that prevent it from running

incarnadined commented 5 years ago

Surely it doesn't send the 4players message because it runs into an error before that

Luckyme66 commented 5 years ago

Yup. I haven't really tried to solve the problem in more ways than messing around with a few things. It's nearly solved now (I hope).

incarnadined commented 5 years ago

I don't know what you've updated offline, if len(clients) >= 4: else: for sock in clients: sock.send(bytes('PickOrder,askinput','utf8')) order = sock.recv(buffer).decode(utf8) break Client.broadcast('4players','event')but the indentation is messed up

Luckyme66 commented 5 years ago

I was midway through editing that. Yeah, that was broken. The next time I commit that should be fixed.