mirror of https://bitbucket.org/ausocean/av.git
Merged in sender/nilfix (pull request #30)
revid: fix nil dereference panic
This commit is contained in:
commit
5a4ce1aa9c
|
@ -124,6 +124,7 @@ func newHttpSender(url string, timeout time.Duration, log func(lvl, msg string))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *httpSender) load(c *ring.Chunk) error {
|
func (s *httpSender) load(c *ring.Chunk) error {
|
||||||
|
s.chunk = c
|
||||||
buf := bytes.NewBuffer(s.buf[:0])
|
buf := bytes.NewBuffer(s.buf[:0])
|
||||||
_, err := s.chunk.WriteTo(buf)
|
_, err := s.chunk.WriteTo(buf)
|
||||||
s.buf = buf.Bytes()
|
s.buf = buf.Bytes()
|
||||||
|
|
Loading…
Reference in New Issue