Skip to content

Commit

Permalink
ok flag is misleading, it's really if channel is closed, so return ok…
Browse files Browse the repository at this point in the history
…Flag
  • Loading branch information
ngauthier committed Jan 15, 2015
1 parent 2cf4b2c commit ef6572b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ func writePipe(pipe chan interface{}) (ok bool) {
if pipe != nil {
for {
select {
case item, ok := <-pipe:
if !ok {
return false
case item, more := <-pipe:
if !more {
return okFlag
} else {
switch item.(type) {

Expand Down

0 comments on commit ef6572b

Please sign in to comment.