Stop() the raftServer if we stop the peerServer so that tests that start and stop PeerServers exit cleanly.
@@ -158,6 +158,7 @@ func (s *PeerServer) Stop() {
close(s.closeChan)
s.closeChan = nil
}
+ s.raftServer.Stop()
func (s *PeerServer) HTTPHandler() http.Handler {