Commit 2f7615d3 authored by 's avatar
Browse files

changed back - off mechanism of reconnection

git-svn-id: file:///home/svn/mapi/trunk@1170 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 4a82bcaf
......@@ -901,7 +901,7 @@ void restore_network_mapicommd(struct host *h){
int time = 1; // initial waiting time
int check_net;
for(tries = 0; tries < 10; tries++){
for(tries = 0; ; tries++){
printf("\n---> Reconnection try #%d", tries);
check_net = check_network_mapicommd(h);
......@@ -916,8 +916,10 @@ void restore_network_mapicommd(struct host *h){
return;
}
sleep(time); // pause execution for the specified time
time += time; // increase waiting time
sleep(time); // pause execution for the specified time
if (tries < 8)
time += time; // increase waiting time
}
fprintf(stderr,"\nNetwork is down (reconnection tries expired)\n");
......@@ -1413,7 +1415,7 @@ void restore_network_mapid(void){
int time = 1; // initial waiting time
int check_net;
for(tries = 0; tries < 10; tries++){
for(tries = 0; ; tries++){
printf("\n---> Reconnection try #%d", tries);
check_net = check_network_mapid();
......@@ -1426,8 +1428,10 @@ void restore_network_mapid(void){
mapiipc_client_init(); // initializes IPC for mapi functions
return;
}
sleep(time); // pause execution for the specified time
time += time; // increase waiting time
sleep(time); // pause execution for the specified time
if (tries < 8)
time += time; // increase waiting time
}
fprintf(stderr,"\nNetwork is down (reconnection tries expired)\n");
exit(EXIT_FAILURE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment