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] Program locks after RCON response from Team Fortress 2 server #13

Open polvora opened 1 year ago

polvora commented 1 year ago

# System Information

# Bug Description

After succesfully connecting to Team Fortress 2 server RCON, i can issue commands but program locks after processing the response from the server, so it never returns to the prompt to execute the next command. CTRL-C has no effect.

The command gets executed correctly and the full text respose from the server is displayed but no prompt is shown to enter the next command, connection command is: ARRCON -H host.name -P 27015 -p rcon_password

Then:

    Authentication Successful.
    Use <Ctrl + C> or type "exit" to quit.
    RCON@host.name> sv_password
    "sv_password" = "mix" ( def. "" )
     notify
     - Server password for entry into multiplayer games

After that, program becomes unresponsive and only option is to close the window.

# Reproduction Steps

To recreate the problem attempt to send a command in interactive mode to a Team Fortress 2 server with the windows client.

If it does not work with team fortress probably won't work either with any other valve source game as it behaves exactly the same.

If you need a server to test i can (privately) share my server rcon data.

(I hope this is not me not using the program correctly).

radj307 commented 1 year ago

Could you check if this also happens on v3.3.5? I have a suspicion that something went wrong when compiling v3.3.6.

If that does fix it, I'll roll back the release of 3.3.6 since it isn't very major and do some fixes before moving forward.

polvora commented 1 year ago

Same result with windows version v3.3.5. Tested with multiple versions now, version from v3.2.6 and newer have the same issue. In version 3.2.5 this does not happen, but in that version there is other problem, it seems that the command response is "delayed", so if i input a first_command i receive the first_response after sending a second_command like this:

    >> first_command
    // no response
    >> second_command
    first_response
    >> third_command
    second_response

And so on. This coincides with the linux release

radj307 commented 1 year ago

You can try increasing the timeout before the program stops waiting for a response via the INI.

Use ARRCON --write-ini, then edit ~/.config/ARRCON/ARRCON.ini (C:\Users\<USERNAME>\.config\ARRCON\ARRCON.ini):

[timing]
iSelectTimeout = 250 #< increase this as needed

Try increasing it to 500 and see if that helps.

iSelectTimeout sets the max time in milliseconds that the program will wait for a response from the server before assuming that it didn't respond. Depending on your connection, it may be necessary to adjust this to account for network latency.
Additional documentation about the INI config can be found here.

polvora commented 1 year ago

It was already on 500, changed it to 1000 but no change, i have less than 10 ms of delay with the server, so i don't think that's a problem. Also i think i would notice if there was a response slower than 250 ms, right now it feels instantaneous.

radj307 commented 4 months ago

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