Skip to content

Commit b0ffe7f

Browse files
authored
Merge pull request #3236 from grey3228/fix/avoid-nil-volume
dispatcher: guard against missing volumes in assignments stream
2 parents 6588003 + 4ce0910 commit b0ffe7f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

manager/dispatcher/dispatcher.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,9 @@ func (d *Dispatcher) Assignments(r *api.AssignmentsRequest, stream api.Dispatche
11741174
case api.EventUpdateVolume:
11751175
d.store.View(func(readTx store.ReadTx) {
11761176
vol := store.GetVolume(readTx, v.Volume.ID)
1177+
if vol == nil {
1178+
return
1179+
}
11771180
// check through the PublishStatus to see if there is
11781181
// one for this node.
11791182
for _, status := range vol.PublishStatus {

0 commit comments

Comments
 (0)