From 4abe4a6fbd028199a0deb859d0782f6a68c4367c Mon Sep 17 00:00:00 2001 From: Hans Feldt Date: Thu, 12 Oct 2006 06:54:14 +0000 Subject: [PATCH] This simple patch solves a problem we see when testing AMF. If a node leaves and joins the cluster quickly (within one second is default), the config change messages will not indicate that the node left and rejoined. The patch introduces a short delay in main() to make sure the token_timeout expires. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1259 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/exec/main.c b/exec/main.c index b24191b8..5f2747b5 100644 --- a/exec/main.c +++ b/exec/main.c @@ -530,6 +530,13 @@ int main (int argc, char **argv) totem_config.totem_logging_configuration.log_level_debug = mkpri (LOG_LEVEL_DEBUG, totem_log_service); totem_config.totem_logging_configuration.log_printf = internal_log_printf; + /* + * Sleep for a while to let other nodes in the cluster + * understand that this node has been away (if it was + * an aisexec restart). + */ + usleep(totem_config.token_timeout * 2000); + /* * if totempg_initialize doesn't have root priveleges, it cannot * bind to a specific interface. This only matters if