Skip to content

Commit

Permalink
restore: do record error comes from stream.Close() (pingcap#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm authored Oct 18, 2018
1 parent dcaf1b1 commit cc2b3e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lightning/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,11 @@ outside:
}
err = stream.Put(totalKVs)
if e := stream.Close(); e != nil {
common.AppLogger.Warnf("failed to close write stream: %s", e.Error())
if err != nil {
common.AppLogger.Warnf("failed to close write stream: %s", e.Error())
} else {
err = e
}
}
metrics.MarkTiming(deliverMark, start)
if err != nil {
Expand Down

0 comments on commit cc2b3e8

Please sign in to comment.