Merge pull request #18 from fkautz/pr_out_closing_channel_when_http_server_dies
This commit is contained in:
commit
7db1d5afef
2 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue