doesn't look like it worked

This commit is contained in:
saxon 2019-02-07 18:19:38 +10:30
parent 3f72e21970
commit c7f1acac26
1 changed files with 29 additions and 31 deletions

View File

@ -126,40 +126,38 @@ func (s *httpSender) load(c *ring.Chunk) error {
}
func (s *httpSender) send() error {
/*
if s.chunk == nil {
// Do not retry with httpSender,
// so just return without error
// if the chunk has been cleared.
return nil
}
// Only send if "V0" is configured as an input.
send := false
ip := s.client.Param("ip")
pins := netsender.MakePins(ip, "V")
for i, pin := range pins {
if pin.Name == "V0" {
send = true
pins[i].Value = s.chunk.Len()
pins[i].Data = s.chunk.Bytes()
pins[i].MimeType = "video/mp2t"
break
}
}
if !send {
return nil
}
var err error
var reply string
reply, _, err = s.client.Send(netsender.RequestRecv, pins)
if err != nil {
return err
if s.chunk == nil {
// Do not retry with httpSender,
// so just return without error
// if the chunk has been cleared.
return nil
}
// Only send if "V0" is configured as an input.
send := false
ip := s.client.Param("ip")
pins := netsender.MakePins(ip, "V")
for i, pin := range pins {
if pin.Name == "V0" {
send = true
pins[i].Value = s.chunk.Len()
pins[i].Data = s.chunk.Bytes()
pins[i].MimeType = "video/mp2t"
break
}
}
return s.extractMeta(reply)
*/
return nil
if !send {
return nil
}
var err error
var reply string
reply, _, err = s.client.Send(netsender.RequestRecv, pins)
if err != nil {
return err
}
return s.extractMeta(reply)
}
// extractMeta looks at a reply at extracts any time or location data - then used