Просмотр исходного кода

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

Steven Dake 16 лет назад
Родитель
Сommit
13f3f6214d
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      exec/coroipcs.c

+ 2 - 1
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);