Make a copy of available layers in forwarder. (#709)
Should be okay as that is usually only three elements max. Stream tracker + manager send available layers. As stream trackers run in different go routines, need to think some more about chances of out-of-order operations. But, making a copy in forwarder so that it is not referncing moving data. Also, when setting up provisional allocation, make a copy (that was the intention, i. e. a provisional allocation should have stable data to work with).
This commit is contained in:
@@ -157,7 +157,7 @@ func TestForwarderUpTrackLayersChange(t *testing.T) {
|
||||
|
||||
availableLayers = []int32{}
|
||||
f.UpTrackLayersChange(availableLayers)
|
||||
require.Equal(t, availableLayers, f.availableLayers)
|
||||
require.Nil(t, f.availableLayers)
|
||||
}
|
||||
|
||||
func TestForwarderAllocate(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user