Sfoglia il codice sorgente

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 anni fa
parent
commit
1b3481fe25
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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 {