Fix deadlock
This commit is contained in:
parent
7f3fe3ce4e
commit
ad43f4e092
1
hash.go
1
hash.go
@ -38,6 +38,7 @@ func hsh(files []string) chan result {
|
|||||||
r := make(chan result)
|
r := make(chan result)
|
||||||
go func() {
|
go func() {
|
||||||
r <- result{err: fmt.Errorf("unsupported algorithm: %v", *algo)}
|
r <- result{err: fmt.Errorf("unsupported algorithm: %v", *algo)}
|
||||||
|
close(r)
|
||||||
}()
|
}()
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user