close reporting channel

main
Ben Grewell 4 years ago
parent 44a0f92611
commit 03d6ae7d3b

@ -3,7 +3,6 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fc2840de-29dc-4fca-8e0e-a283562f60ca" name="Default Changelist" comment=""> <list default="true" id="fc2840de-29dc-4fca-8e0e-a283562f60ca" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client.go" beforeDir="false" afterPath="$PROJECT_DIR$/client.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/reporter_linux.go" beforeDir="false" afterPath="$PROJECT_DIR$/reporter_linux.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/reporter_linux.go" beforeDir="false" afterPath="$PROJECT_DIR$/reporter_linux.go" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />

@ -57,7 +57,6 @@ func (r *Reporter) runLogProcessor() {
} }
for line := range tailer.Lines { for line := range tailer.Lines {
// TODO: For now this only cares about individual streams it ignores the sum lines // TODO: For now this only cares about individual streams it ignores the sum lines
fmt.Println(line.Text)
if len(line.Text) > 5 { if len(line.Text) > 5 {
id := line.Text[1:4] id := line.Text[1:4]
stream, err := strconv.Atoi(strings.TrimSpace(id)) stream, err := strconv.Atoi(strings.TrimSpace(id))
@ -116,6 +115,8 @@ func (r *Reporter) runLogProcessor() {
} }
if !r.running { if !r.running {
fmt.Println("reporter is finished. exiting")
close(r.ReportingChannel)
return return
} }
} }

Loading…
Cancel
Save