keeping communication thread alive for MAX 24h

This commit is contained in:
Václav Šmejkal 2023-02-20 18:58:32 +01:00
parent 73a7be454b
commit 97337f06db
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -60,7 +60,9 @@ int main(void)
void *communicate_thread(void *arg)
{
for (;;)
const time_t startTime = time(NULL);
while (time(NULL) - startTime < 86400) //KEEP COMMUNICATION ALIVE FOR 24 HOURS
{
char *received = read_socket(*((int*) arg)); //READ