Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6b267ab

Browse files
committedDec 18, 2015
Close errnotifier chan on err
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
1 parent fb8189d commit 6b267ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎core/corehttp/logs.go

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func (w *writeErrNotifier) Write(b []byte) (int, error) {
2727
if err != nil {
2828
select {
2929
case w.errs <- err:
30+
close(w.errs)
3031
default:
3132
}
3233
}
@@ -39,6 +40,7 @@ func (w *writeErrNotifier) Write(b []byte) (int, error) {
3940
func (w *writeErrNotifier) Close() error {
4041
select {
4142
case w.errs <- io.EOF:
43+
close(w.errs)
4244
default:
4345
}
4446
return nil

0 commit comments

Comments
 (0)
Please sign in to comment.