Skip to content

v1.31.1 — A phone dropping off wifi no longer stops the game

Latest

Choose a tag to compare

@colfin22 colfin22 released this 09 Aug 08:30

v1.31.1 — A phone dropping off wifi no longer stops the game

A crash fix. Nothing about how your games play has changed.

When the server sends an update to every phone, it sends them one at a time and
collects any that failed. A phone that locks its screen, drops off wifi or walks
out of range leaves exactly that kind of failed socket. The server then tried to
remove it from its list, but by then the disconnect had often already removed it,
and that raised an error.

The error did not stop at the phone that left. It came back out into whoever was
driving the game at that moment, which is usually the host, and it killed their
connection. In the report it happened in the middle of starting a round.

The removal is now done in a way that is safe no matter how many times a socket
has already gone. There is a test covering it, and that test fails on the old code
with the exact error from the report.

One related tidy up. The pause before a true or false verdict was the only place
that sent an update without taking the lock every other place takes. It takes the
lock now, so its checks and the host skipping ahead cannot cross over each other.

This is issue 77.