Skip to content

Commit f6f677f

Browse files
authored
Merge pull request #359 from danielorbach/bugfix/WriteAPIBlocking-Flush-always-returns-non-nil-error
fix(WriteAPIBlocking): properly return error from flush()
2 parents 6bd9713 + 0292c61 commit f6f677f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/writeAPIBlocking.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ func (w *writeAPIBlocking) flush(ctx context.Context) error {
119119
body := strings.Join(w.batch, "\n")
120120
w.batch = w.batch[:0]
121121
b := iwrite.NewBatch(body, w.writeOptions.MaxRetryTime())
122-
return w.service.WriteBatch(ctx, b)
122+
if err:= w.service.WriteBatch(ctx, b); err != nil {
123+
return err
124+
}
123125
}
124126
return nil
125127
}

0 commit comments

Comments
 (0)