Skip to content

Commit

Permalink
Merge pull request shell909090#13 from pingliu/fix_reload_bug
Browse files Browse the repository at this point in the history
fix reload bug
  • Loading branch information
shell909090 authored May 9, 2017
2 parents 7fbe1f8 + 91508b7 commit 63fd6df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func (bs *Backends) worker() {
// closed
bs.Flush()
bs.HttpBackend.Close()
bs.fb.Close()
return
}
bs.WriteBuffer(p)
Expand Down
6 changes: 6 additions & 0 deletions backend/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,9 @@ func (fb *FileBackend) RollbackMeta() (err error) {
}
return
}

func (fb *FileBackend) Close() {
fb.producer.Close()
fb.consumer.Close()
fb.meta.Close()
}
1 change: 1 addition & 0 deletions backend/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,6 @@ func (hb *HttpBackend) WriteStream(stream io.Reader, compressed bool) (err error

func (hb *HttpBackend) Close() (err error) {
hb.running = false
hb.transport.CloseIdleConnections()
return
}

0 comments on commit 63fd6df

Please sign in to comment.