Skip to content

Commit

Permalink
Handle request errors during raft snapshot (#8861)
Browse files Browse the repository at this point in the history
* Handle request errors during raft snapshot
  • Loading branch information
sgmiller authored Apr 27, 2020
1 parent 03332aa commit 8571221
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/sys_raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func (c *Sys) RaftSnapshot(snapWriter io.Writer) error {
// to determine if the body contains error message.
var result *Response
resp, err := c.c.config.HttpClient.Do(req)
if err != nil {
return err
}

if resp == nil {
return nil
}
Expand Down

0 comments on commit 8571221

Please sign in to comment.