Skip to content

Commit

Permalink
added nil check for xferdone chan
Browse files Browse the repository at this point in the history
  • Loading branch information
wonwuakpa-msft committed Oct 18, 2024
1 parent 15eb334 commit 0f823a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ste/jobStatusManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ func (jm *jobMgr) SendXferDoneMsg(msg xferDoneMsg) {
jm.Log(common.LogError, "Cannot send message on channel")
}
}()
select {
case jm.jstm.xferDone <- msg:
case <-jm.jstm.statusMgrDone: // Nobody is listening anymore, let's back off.
if jm.jstm.xferDone != nil {
select {
case jm.jstm.xferDone <- msg:
case <-jm.jstm.statusMgrDone: // Nobody is listening anymore, let's back off.
}
}
}

Expand Down

0 comments on commit 0f823a5

Please sign in to comment.