Skip to content

Commit a115801

Browse files
committed
Fix case where done channel could be closed twice
1 parent 59803d4 commit a115801

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pipedream/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,13 @@ func run(cmd *cobra.Command, args []string) error {
162162
fmt.Printf("%s Upload failed:\n\n%s\n\n", ex, errMsg)
163163
}
164164
close(done)
165+
break
165166
case pipedream.Complete:
166167
if !silent {
167168
fmt.Printf("%s Done. Sent %s in %s.\n", check, humanize.Bytes(uint64(e.Bytes)), time.Since(now).Round(time.Millisecond))
168169
}
169170
close(done)
171+
break
170172
}
171173
}
172174
}

0 commit comments

Comments
 (0)