[update] ctrlTerm timeout to 10sec

This commit is contained in:
xdrm-brackets 2017-05-04 11:56:07 +02:00
parent 6fbd41542b
commit 9a6c480290
2 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,7 @@
#define maxHostLen 64
#define maxPortLen 6
#define CTRL_TIMEOUT 10 // 10sec timeout (pour ctrlTerm)
#define SOCK_TIMEOUT 4 // 4sec timeout (1+ temps refresh plane)
#define PUBL_TIMEOUT 2 // 2sec entre chaque publication sur multicast UDP (pour avions)

View File

@ -94,7 +94,14 @@ int multicastTerminal(struct middleware_arg* arg){
}
/* 3. On définit un timeout (si aucune connection) */
/* 3.1. Si viewTerm -> default timeout (4sec) */
if( strcmp(arg->entity, "udp_vterm") == 0 )
setTimeout(*arg->comSock, SOCK_TIMEOUT, TIMEOUT_RECV|TIMEOUT_SEND);
/* 3.2. Si ctrlTerm -> 10sec timeout */
else
setTimeout(*arg->comSock, CTRL_TIMEOUT, TIMEOUT_RECV|TIMEOUT_SEND);
/* (2) Récupération port random