Fixed jail.cells nil assignment (#398)
jail.cells is now re-created upon Jail.Stop, not assigned to nil. Assigning it to nil led to runtime panic when a node was stopped and started again.
This commit is contained in:
parent
12412b3f58
commit
16741f9517
|
@ -75,7 +75,8 @@ func (jail *Jail) Stop() {
|
|||
for _, cell := range jail.cells {
|
||||
cell.Stop()
|
||||
}
|
||||
jail.cells = nil
|
||||
// TODO(tiabc): Move this initialisation to a proper place.
|
||||
jail.cells = make(map[string]*Cell)
|
||||
}
|
||||
|
||||
// Cell returns the existing instance of Cell.
|
||||
|
|
Loading…
Reference in New Issue