not disconnecting user on null message

This commit is contained in:
Václav Šmejkal 2024-02-25 13:15:54 +01:00
parent 47fd5f01b6
commit 157d56ac57
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -623,12 +623,7 @@ void *why2_communicate_thread(void *arg)
decoded_buffer = get_string_from_json_string(raw, "message"); //DECODE
if (decoded_buffer == NULL) //idk sometimes this happen, idk why
{
force_exiting = 1; //force exit <3
} else
{
if (strlen(decoded_buffer) != 0)
if (decoded_buffer != NULL && strlen(decoded_buffer) != 0)
{
if (decoded_buffer[0] == '!') //COMMANDS
{
@ -656,7 +651,6 @@ void *why2_communicate_thread(void *arg)
send_to_all(raw_output); //e
}
}
}
deallocation: