mirror of https://bitbucket.org/ausocean/av.git
Removed some more use of debug
This commit is contained in:
parent
eb3f6a82d9
commit
3d46b750e7
|
@ -325,16 +325,14 @@ func (r *revidInst)sendClipToHTTP(clip []byte, output string) error {
|
||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
}
|
}
|
||||||
url := output + strconv.Itoa(len(clip))
|
url := output + strconv.Itoa(len(clip))
|
||||||
if r.config.Debug {
|
|
||||||
fmt.Printf("Posting %s (%d bytes)\n", url, len(clip))
|
fmt.Printf("Posting %s (%d bytes)\n", url, len(clip))
|
||||||
}
|
|
||||||
resp, err := client.Post(url, "video/mp2t", bytes.NewReader(clip)) // lighter than NewBuffer
|
resp, err := client.Post(url, "video/mp2t", bytes.NewReader(clip)) // lighter than NewBuffer
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Error posting to %s: %s", output, err)
|
return fmt.Errorf("Error posting to %s: %s", output, err)
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err == nil && r.config.Debug {
|
if err == nil {
|
||||||
fmt.Printf("%s\n", body)
|
fmt.Printf("%s\n", body)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue