types: use mtx on PartSet.String()

This commit is contained in:
Ethan Buchman
2017-03-02 20:47:07 -05:00
parent 6456654307
commit 8ba79252c8
5 changed files with 20 additions and 15 deletions

View File

@ -268,6 +268,8 @@ func (ps *PartSet) StringShort() string {
if ps == nil {
return "nil-PartSet"
} else {
ps.mtx.Lock()
defer ps.mtx.Unlock()
return fmt.Sprintf("(%v of %v)", ps.Count(), ps.Total())
}
}