Browse Source

fix(server/peer_server): stop the raftServer in Stop()

Stop() the raftServer if we stop the peerServer so that tests that start
and stop PeerServers exit cleanly.
Brandon Philips 12 years ago
parent
commit
1b3481fe25
1 changed files with 1 additions and 0 deletions
  1. 1 0
      server/peer_server.go

+ 1 - 0
server/peer_server.go

@@ -158,6 +158,7 @@ func (s *PeerServer) Stop() {
 		close(s.closeChan)
 		close(s.closeChan)
 		s.closeChan = nil
 		s.closeChan = nil
 	}
 	}
+	s.raftServer.Stop()
 }
 }
 
 
 func (s *PeerServer) HTTPHandler() http.Handler {
 func (s *PeerServer) HTTPHandler() http.Handler {