mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
Closing channel when http server dies
Fixing deadlock on error
This commit is contained in:
parent
3f03ce7334
commit
2ede0bff52
@ -16,4 +16,5 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error, router http.Han
|
|||||||
log.Println("Starting HTTP Server")
|
log.Println("Starting HTTP Server")
|
||||||
err := http.ListenAndServe(":8080", router)
|
err := http.ListenAndServe(":8080", router)
|
||||||
errorChannel <- err
|
errorChannel <- err
|
||||||
|
close(errorChannel)
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ func Start() {
|
|||||||
|
|
||||||
cases := createSelectCases(statusChans)
|
cases := createSelectCases(statusChans)
|
||||||
|
|
||||||
for {
|
for len(cases) > 0 {
|
||||||
chosen, value, recvOk := reflect.Select(cases)
|
chosen, value, recvOk := reflect.Select(cases)
|
||||||
if recvOk == true {
|
if recvOk == true {
|
||||||
// Status Message Received
|
// Status Message Received
|
||||||
|
Loading…
x
Reference in New Issue
Block a user