radj307 / ARRCON

Lightweight Source RCON client that works on Windows, macOS, & Linux.
GNU General Public License v3.0
173 stars 11 forks source link

[BUG] ARRCON shows previous response for current command #15

Open rykugur opened 1 year ago

rykugur commented 1 year ago

# System Information

Using ARRCON 3.3.5 (latest release).

# Bug Description

Upon successful authentication (either manually or using a saved session, when I type a command, I get [no response]. The second command I type, regardless of what it is (even if it's an invalid command), displays the results of the first command I typed. The third command will display the results of the second. And so on. Here's an example:

Authentication Successful.
Use <Ctrl + C> or type "exit" to quit.
RCON@...> players
[no response]
RCON@...> who
Players connected (0): 
RCON@...> players
Unknown command who
RCON@...> players
Players connected (0): 
RCON@...> ^C

The server I'm connecting to is a Project Zomboid server, running in docker. Other rcon clients I have tried do not have this problem.

# Reproduction Steps

Connect to a Project Zomboid server (you can relatively easy set one up using one of the docker containers available; I'm using https://github.com/PepeCitron/projectzomboid-server) Try a command Try an invalid command Try a command

preppie22 commented 5 months ago

Bumping this because I'm having the exact same problem.

radj307 commented 4 months ago

This happens because of a limitation in ARRCON v3's design. The client isn't waiting long enough for the server's response before assuming it just didn't respond at all.

You can fix this by increasing the value of the iSelectTimeout setting past its default of 500 (milliseconds) in ~/.config/ARRCON/ARRCON.ini. Increase it by 500 and try again, repeating as necessary until the issue goes away.

The main goal of ARRCON v4 is to improve networking robustness, which includes this bug. I switched to using Boost ASIO for networking instead of raw sockets, which will remove the need for manually setting delays.

radj307 commented 4 months ago

Please try v4.0.0-pr1 and let me know if the problem is resolved.