X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/78c37d1780d1243aec405e7f38751e0aa5037c38..b8892821525cf5204c842476d26f530ddcca4908:/examples/gras/ping/ping_server.c diff --git a/examples/gras/ping/ping_server.c b/examples/gras/ping/ping_server.c index 29e853dba8..3e8b95b4b3 100644 --- a/examples/gras/ping/ping_server.c +++ b/examples/gras/ping/ping_server.c @@ -51,11 +51,8 @@ static int server_cb_ping_handler(gras_msg_cb_ctx_t ctx, void *payload) { /* 7. Set the endcondition boolean to true (and make sure the server stops after receiving it). */ globals->endcondition = 1; - - /* 8. Make sure we don't leak sockets */ - gras_socket_close(expeditor); - - /* 9. Tell GRAS that we consummed this message */ + + /* 8. Tell GRAS that we consummed this message */ return 0; } /* end_of_server_cb_ping_handler */ @@ -90,7 +87,7 @@ int server (int argc,char *argv[]) { globals->endcondition=0; /* 6. Wait up to 10 minutes for an incomming message to handle */ - gras_msg_handle(60.0); + gras_msg_handle(10.0); /* 7. Housekeeping */ if (!globals->endcondition) @@ -99,8 +96,8 @@ int server (int argc,char *argv[]) { /* 8. Free the allocated resources, and shut GRAS down */ gras_socket_close(globals->sock); free(globals); + INFO0("Done."); gras_exit(); - INFO0("Done."); return 0; } /* end_of_server */