diff --git a/revid/senders.go b/revid/senders.go index defdada0..4be4c5f3 100644 --- a/revid/senders.go +++ b/revid/senders.go @@ -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