-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipv4/ipv6 localhost and letter count again #108
Comments
Puzzling, The logic that handles the display of tile counts is purely front-end - the server tells each player how many tiles each player has, and the display is updated accordingly. If the server was misinforming the players, I would expect to see the tile counts "go funny" for all players, not just a single player, and it should not be affected by a refresh. Therefore the problem is in the UI code. I will investigate. |
I have tried everything I can think of, but I can't reproduce this (on 3.1.5). The following is an a posteriori analysis based on the limited information available.
The letter bag object in question is local to the UI. It should only be modified when a Turn object is received from the server. Since a spurious turn object would indicate a severe flaw in the gameplay, and would be received by all players, I think this is unlikely. So it must be being modified some other way. Looking back up the call stack, I'm going to keep this open for now in case anyone can reproduce it consistently; in that case, I hope they can let me have more information as to exactly what happens in the UI. |
Following up with the localhost item I mentioned, I was able to get it to bind to ipv4 localhost without forcing it to 127.0.0.1 in server.js by changing /etc/gai.conf to prefer ipv4. This can be done using the line (default is 10 so 100 makes ipv6 less preferable):
precedence ::ffff:0:0/96 100
The reason ipv6 wasn't working for me is because I have my web server redirecting 9093 to 127.0.0.1 instead of just "localhost". I didn't test, but likely I could have kept gai.conf as is and alternatively changed the webserver config to redirect to "localhost" instead of 127.0.0.1. So think your code is fine in that regard.
We did still notice some weird behavior of the letter count at the end. It was flipping back and forth from on to off. I'm not positive, but it seemed like it was happening (in our 3 player game at least) when two of the players had less than 7 tiles, but the third had 7. In this case, it happened to be me and it seemed like when I put a couple letters down on the board, that's when the count started disappearing, but then would reapper with a refresh, but then disappear if I hit the take back tiles button and so on. So may be something around the logic of playing tiles and when only one player has 7, although not positive as we only played one game with the new code.
The text was updated successfully, but these errors were encountered: