Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Commit

Permalink
Merge pull request #97 from taskcluster/channel-cleanup
Browse files Browse the repository at this point in the history
Close livelog channels when finished with them
  • Loading branch information
petemoore authored Jun 6, 2018
2 parents 665d793 + af07c42 commit 8cece2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions livelog/livelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func New(liveLogExecutable, sslCert, sslKey string, putPort, getPort uint16) (*L
}
putResult := make(chan CommandResult)
go func() {
defer close(putResult)
var b bytes.Buffer
l.command.Stdout = &b
l.command.Stderr = &b
Expand All @@ -97,6 +98,7 @@ func New(liveLogExecutable, sslCert, sslKey string, putPort, getPort uint16) (*L

inputStreamConnectionResult := make(chan error)
go func() {
defer close(inputStreamConnectionResult)
err := l.connectInputStream()
inputStreamConnectionResult <- err
}()
Expand Down

0 comments on commit 8cece2c

Please sign in to comment.