FAForever / FAForever/server

disconnect peers from player closing the game

Abierto
#345 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
72
Forks
84
Merge medio
5 h 11 min
PR fusionados (30 d)
1

Descripción

I'm experiencing two issues in my [ice branch](https://github.com/muellni/server/tree/ice):
- if the host closes his game, the other peers do not get the `DisconnectFromPeer` message and will get the timeout after a while
- if a player Alt-F4 quits during the game the other peers also only get a timeout after a while

If the client detects the game process has quit, the server [gets noticed](https://github.com/FAForever/server/blob/develop/server/gameconnection.py#L434).
This [triggers `abort()`](https://github.com/FAForever/server/blob/develop/server/gameconnection.py#L475) but `abort()` will never reach the [`DisconnectFromPeer` code](https://github.com/FAForever/server/blob/develop/server/gameconnection.py#L454), because the game is not in `GameState.LOBBY` for these two cases (because the [host quitting will trigger on_game_end() before](https://github.com/FAForever/server/blob/develop/server/games/game.py#L319))

I would suggest to inform the other peers here: https://github.com/FAForever/server/blob/develop/server/gameconnection.py#L434

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.