mirror of https://bitbucket.org/ausocean/av.git
revid: fix nil dereference panic
This commit is contained in:
parent
9d6836f585
commit
f953216f31
|
@ -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