ok flag is misleading, it's really if channel is closed, so return okFlag

This commit is contained in:
Nick Gauthier 2015-01-15 12:44:18 -05:00
parent 2cf4b2c33e
commit ef6572b9aa

View File

@ -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) {