Jaskowicz1 / rconpp

A modern Source RCON library for C++
Apache License 2.0
9 stars 0 forks source link

Responses are empty after 2nd command send #11

Open Pelayori opened 8 months ago

Pelayori commented 8 months ago

Windows app. After using send_command_sync with a simple command "listplayers" in ARK, the response comes empty, crashing the app.

The code crashes at client.cpp, line 158 (packet_response.data is empty)

rconpp::response rconpp::rcon_client::receive_information(int32_t id, rconpp::data_type type) {
    // Whilst this loop is better than a while loop,
    // it should really just keep going for a certain amount of seconds.
    for (int i = 0; i < 500; i++) {
        packet packet_response = read_packet();

        int packet_type = bit32_to_int(packet_response.data);

I'm using the general_improvements branch.

Pelayori commented 8 months ago

Attempting connection to RCON server... Connected successfully! Sending login data... Sent login data. Did not receive a packet in time. Did the server send a response? Error code: 10060

Jaskowicz1 commented 8 months ago

Hi there,

I believe this might be something I fixed and forgot to push, which would explain why I didn't merge that branch yet :sweat_smile:

I'll have a look soon (in a few hours or so) as I'm a bit busy at this current moment, but I'll get back to you soon!

Jaskowicz1 commented 6 months ago

back to you soon!

I may have gotten very busy 😭