这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (p *Progress) Listen() {
for {
select {
case <-p.stopChan:
p.stopChan = nil
return
default:
time.Sleep(p.RefreshInterval)
Expand All @@ -113,7 +114,11 @@ func (p *Progress) Start() {
// Stop stops listening
func (p *Progress) Stop() {
close(p.stopChan)
p.stopChan = nil
for {
if p.stopChan == nil {
return
}
}
}

// Bypass returns a writer which allows non-buffered data to be written to the underlying output
Expand Down