From bc0a5dc216778e8596a60177e35f13fdc429fcb1 Mon Sep 17 00:00:00 2001 From: mquinson Date: Sun, 11 Jul 2004 22:34:39 +0000 Subject: [PATCH] The server timeouts after a while instead of running for ever (useful for solaris platforms where you must be root to killall) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@243 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/ping/ping.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/ping/ping.c b/examples/ping/ping.c index 39ca8dd11c..5724135eaa 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); -- 2.20.1