FAForever / FAForever/server

disconnect peers from player closing the game

Ouverte
#345 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
72
Forks
84
Merge moyen
5 h 11 min
PR mergées (30 j)
1

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.