don't delete jobs map

This commit is contained in:
Roy Crihfield 2023-04-06 23:25:29 +08:00
parent 9ba52345df
commit 616c33f006

View File

@ -890,9 +890,6 @@ func (sds *Service) UnsubscribeWriteStatus(id rpc.ID) error {
sds.Lock() sds.Lock()
close(sds.jobStatusSubs[id].quitChan) close(sds.jobStatusSubs[id].quitChan)
delete(sds.jobStatusSubs, id) delete(sds.jobStatusSubs, id)
if len(sds.jobStatusSubs) == 0 {
sds.jobStatusSubs = nil
}
sds.Unlock() sds.Unlock()
return nil return nil
} }