return early if s.aborted
Vladimir Bauer
4 years ago
1 changed file(s) with
1 addition(s)
and
1 deletion(s)
.
Raw diff
Collapse all
Expand all
+1
-1
bar.go
less
more
298
298
func (b *Bar) Abort(drop bool) {
299
299
select {
300
300
case b.operateState <- func(s *bState) {
301
if s.completed {
301
if s.completed || s.aborted {
302
302
return
303
303
}
304
304
s.aborted = true