FAForever / FAForever/server

Infinite reconnect loop when you are banned

Open
#813 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
72
Forks
84
Avg merge
5h 11m
Merged PRs (30d)
1

Description

If you try to log in while you are banned, you will receive a message from the server with your ban reason, followed by the server terminating the connection. This causes the client to automatically reconnect, triggering the ban message again and the server terminating the new connection again.

Each time the ban message is triggered, a new message window is stacked on top of the old one. So if your client has reconnected 4 times, you need to click "Dismiss" 4 times to close all of the open message dialogues.

I think it would be reasonable for the client not to attempt a reconnect if its connection is deliberately terminated by the server as it is in this case.

Server log:
```
DEBUG Oct 20 22:33:26 ServerContext ServerContext(LobbyServer): Client connected
DEBUG Oct 20 22:33:26 LobbyConnection LobbyConnection initialized
TRACE Oct 20 22:33:27 LobbyConnection <<: {'version': '1.0.0', 'user_agent': 'downlords-faf-client', 'command': 'ask_session'}
TRACE Oct 20 22:33:27 LobbyConnection >>: {'command': 'session', 'session': 1311792467}
TRACE Oct 20 22:33:31 LobbyConnection <<: {'login': 'Askaholic', 'password': '', 'session': 1311792467, 'unique_id': '', 'local_ip': '192.168.42.7', 'command': 'hello'}
INFO Oct 20 22:33:31 aiomysql SELECT login.id, login.login, login.password, login.steamid, login.create_time, lobby_ban.reason, lobby_ban.expires_at
FROM login LEFT OUTER JOIN lobby_ban ON login.id = lobby_ban.`idUser`
WHERE login.login = 'Askaholic' ORDER BY lobby_ban.expires_at DESC
INFO Oct 20 22:33:31 aiomysql {'login_1': 'Askaholic'}
DEBUG Oct 20 22:33:31 LobbyConnection Rejected login from banned user: 166198, Askaholic, 1311792467
WARNING Oct 20 22:33:31 LobbyConnection Client error: You are banned from FAF forever.
Reason :
You are banned by yourself
WARNING Oct 20 22:33:31 LobbyConnection Aborting 184.53.16.187. You are banned from FAF forever.
Reason :
You are banned by yourself
DEBUG Oct 20 22:33:36 ServerContext ServerContext(LobbyServer): Client connected
DEBUG Oct 20 22:33:36 LobbyConnection LobbyConnection initialized
TRACE Oct 20 22:33:36 LobbyConnection <<: {'version': '1.0.0', 'user_agent': 'downlords-faf-client', 'command': 'ask_session'}
TRACE Oct 20 22:33:36 LobbyConnection >>: {'command': 'session', 'session': 2249396700}
TRACE Oct 20 22:33:40 LobbyConnection <<: {'login': 'Askaholic', 'password': '', 'session': 2249396700, 'unique_id': '', 'local_ip': '192.168.42.7', 'command': 'hello'}
INFO Oct 20 22:33:40 aiomysql SELECT login.id, login.login, login.password, login.steamid, login.create_time, lobby_ban.reason, lobby_ban.expires_at
FROM login LEFT OUTER JOIN lobby_ban ON login.id = lobby_ban.`idUser`
WHERE login.login = 'Askaholic' ORDER BY lobby_ban.expires_at DESC
INFO Oct 20 22:33:40 aiomysql {'login_1': 'Askaholic'}
DEBUG Oct 20 22:33:40 LobbyConnection Rejected login from banned user: 166198, Askaholic, 2249396700
WARNING Oct 20 22:33:40 LobbyConnection Client error: You are banned from FAF forever.
Reason :
You are banned by yourself
WARNING Oct 20 22:33:40 LobbyConnection Aborting 184.53.16.187. You are banned from FAF forever.
Reason :
You are banned by yourself
```

**OS**
Windows

**Wanna have the bug fixed quickly?**
Visit Issue hunt...
[![Issue hunt](https://github.com/BoostIO/issuehunt-materials/raw/master/v1/issuehunt-button-v1.svg?sanitize=true)](https://issuehunt.io/r/FAForever/downlords-faf-client)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.