summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/wr.go b/wr.go
index b76f7cf..9de5419 100644
--- a/wr.go
+++ b/wr.go
@@ -173,7 +173,7 @@ func (w *Writer) Write(b []byte) (int, error) {
func (w *Writer) flusher() {
w.lock.Lock()
defer w.lock.Unlock()
- for len(buf) > 0 {
+ for len(w.buf) > 0 {
buf := w.buf
size := len(buf)
// Don't give too many data to a single Write(), otherwise it