ZOOKEEPER-2687: Deadlock while shutting down the Leader server
Leader server enters into deadlock while shutting down itself. Shutdown of the leader server is called from the synchronized block which must be called from outside the synchronized block. For detail pls refer ZOOKEEPER-2380
Author: Mohammad Arshad <arshad@apache.org>
Reviewers: Abraham Fine <afine@apache.org>, Rakesh Radhakrishnan <rakeshr@apache.org>
Closes #176 from arshadmohammad/ZOOKEEPER-2687 and squashes the following commits:
7551f5c [Mohammad Arshad] Fixed Rakesh's comments
1e3ed70 [Mohammad Arshad] ZOOKEEPER-2687:Deadlock while shutting down the Leader server.