From c7f1acac26276a9727c9d5a8d5172ebef2261bcb Mon Sep 17 00:00:00 2001 From: saxon Date: Thu, 7 Feb 2019 18:19:38 +1030 Subject: [PATCH] doesn't look like it worked --- revid/senders.go | 60 +++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) 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