From 7a64beda8e701d59c9deba1aa803fc629eda0a16 Mon Sep 17 00:00:00 2001 From: ihsan demir Date: Tue, 22 Mar 2016 20:53:06 +0200 Subject: [PATCH] Removed the lock usage in PartitionService shutdown, since it was causing deadlock in Windows environment maintenance nightly builds. --- hazelcast/src/hazelcast/client/spi/PartitionService.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hazelcast/src/hazelcast/client/spi/PartitionService.cpp b/hazelcast/src/hazelcast/client/spi/PartitionService.cpp index f2e1a4bfba..eff549021d 100644 --- a/hazelcast/src/hazelcast/client/spi/PartitionService.cpp +++ b/hazelcast/src/hazelcast/client/spi/PartitionService.cpp @@ -52,7 +52,8 @@ namespace hazelcast { } void PartitionService::shutdown() { - util::LockGuard lg(lock); + // Do not take the lock here since it may be needed by the partition listener thread to cancel and + // the join to succeed and if the lock is already taken it causes a deadlock. if (partitionListenerThread.get() != NULL) { partitionListenerThread->cancel(); partitionListenerThread->join();