From 3392f8192f649631d1b587a43aa8d99be7b183aa Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 8 Jul 2013 16:42:33 -0700 Subject: [PATCH] Remove the lock in init(). Since addPeer func() require that lock. When do log replay in the init(), there will be deadlock --- server.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.go b/server.go index c0c0e7f912..7d67576a5d 100644 --- a/server.go +++ b/server.go @@ -296,8 +296,6 @@ func (s *Server) SetHeartbeatTimeout(duration time.Duration) { // Starts the server with a log at the given path. func (s *Server) Initialize() error { - s.mutex.Lock() - defer s.mutex.Unlock() // Exit if the server is already running. if s.state != Stopped {