mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -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")
|
||||
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…
x
Reference in New Issue
Block a user