Ver código fonte

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 anos atrás
pai
commit
1b3481fe25
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      server/peer_server.go

+ 1 - 0
server/peer_server.go

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