Skip to content

Commit

Permalink
consul: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanuber committed Jan 5, 2016
1 parent c4e7327 commit 2bcaa8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consul/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,9 @@ func (s *Server) setupRaft() error {
s.raft, err = raft.NewRaft(s.config.RaftConfig, s.fsm, log, stable,
snap, s.raftPeers, trans)
if err != nil {
s.raftStore.Close()
if s.raftStore != nil {
s.raftStore.Close()
}
trans.Close()
return err
}
Expand Down

0 comments on commit 2bcaa8a

Please sign in to comment.