From 13f3f6214d876cb2c0c8c0a4ad596b6d028e551c Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Sun, 14 Jun 2009 10:40:50 +0000 Subject: [PATCH] Patch from Jerome Flesch to correctly reference count on bsd and solaris platforms in the IPC system to avoid cpu spinning. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2237 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/coroipcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index 9f7769e6..5057e587 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -1334,7 +1334,6 @@ int coroipcs_handler_dispatch ( res = 0; break; } - coroipcs_refcount_dec (conn_info); } #if defined(COROSYNC_SOLARIS) || defined(COROSYNC_BSD) || defined(COROSYNC_DARWIN) /* On many OS poll never return POLLHUP or POLLERR. @@ -1342,9 +1341,11 @@ int coroipcs_handler_dispatch ( */ if (res == 0) { ipc_disconnect (conn_info); + coroipcs_refcount_dec (conn_info); return (0); } #endif + coroipcs_refcount_dec (conn_info); } coroipcs_refcount_inc (conn_info);