X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b643b5afd98b28e54b82339284af43b1ab7f5ca..1038b1a8e8bcb6f17417a1027a6c59438d248555:/src/gras/Msg/gras_msg_listener.c diff --git a/src/gras/Msg/gras_msg_listener.c b/src/gras/Msg/gras_msg_listener.c index 9649e53a6d..3540090d04 100644 --- a/src/gras/Msg/gras_msg_listener.c +++ b/src/gras/Msg/gras_msg_listener.c @@ -98,6 +98,9 @@ gras_msg_listener_t gras_msg_listener_launch(xbt_queue_t msg_received) arg->listener = xbt_thread_create("listener", listener_function, arg,1/*joinable*/); gras_os_sleep(0); /* give the listener a chance to initialize before we connect to its socket */ + /* We do an active wait until the listener had created the socket (FIXME: ugly hack ) */ + while(arg->wakeup_sock_listener_side == NULL); + /* Connect the other part of the socket */ arg->wakeup_sock_master_side = gras_socket_client(gras_os_myname(),