Skip to content

Commit

Permalink
Adds break with container stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Jul 20, 2020
1 parent 95bc007 commit cef015a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Loop:
select {
case message, ok := <-messages:
if !ok {
fmt.Fprintf(w, "event: container-stopped\ndata: end of stream\n\n")
break Loop
}
fmt.Fprintf(w, "data: %s\n", message)
Expand Down

0 comments on commit cef015a

Please sign in to comment.