X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bd7753d965d41b892925d5d15fc1f9fda663ee95..685c84ca21e79ae55e7d0bee0bf846f85819694d:/examples/ping/ping.c diff --git a/examples/ping/ping.c b/examples/ping/ping.c index 39ca8dd11c..05f99cbd30 100644 --- a/examples/ping/ping.c +++ b/examples/ping/ping.c @@ -116,13 +116,10 @@ int server (int argc,char *argv[]) { gras_socket_my_port(g->sock)); g->endcondition=0; - while (1) { - errcode = gras_msg_handle(10.0); - if (errcode != no_error && errcode != timeout_error) - return errcode; - if (g->endcondition) - break; - } + errcode = gras_msg_handle(600.0); + if (errcode != no_error) + return errcode; + if (g->endcondition) if (!gras_if_RL()) gras_sleep(5,0); @@ -165,8 +162,7 @@ int client(int argc,char *argv[]) { } INFO2("Launch client (server on %s:%d)",host,port); - if (!gras_if_RL()) - gras_sleep(5,0); /* Wait for the server to be setup */ + gras_sleep(5,0); /* Wait for the server to be setup */ if ((errcode=gras_socket_client(host,port,&(g->sock)))) { ERROR1("Client: Unable to connect to the server. Got %s", gras_error_name(errcode));