Merge pull request #18 from fkautz/pr_out_closing_channel_when_http_server_dies

This commit is contained in:
Frederick F. Kautz IV 2015-01-18 17:05:44 -08:00
commit 7db1d5afef
2 changed files with 2 additions and 1 deletions

View file

@ -16,4 +16,5 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error, router http.Han
log.Println("Starting HTTP Server")
err := http.ListenAndServe(":8080", router)
errorChannel <- err
close(errorChannel)
}

View file

@ -27,7 +27,7 @@ func Start() {
cases := createSelectCases(statusChans)
for {
for len(cases) > 0 {
chosen, value, recvOk := reflect.Select(cases)
if recvOk == true {
// Status Message Received