FAForever / FAForever/server

disconnect peers from player closing the game

Đang mở
#345 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
72
Fork
84
Merge trung bình
5 giờ 11 phút
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.