generate coding after indexing
This commit is contained in:
committed by
Greg Fitzgerald
parent
ac7860c35d
commit
93b6fceb2f
@@ -378,15 +378,6 @@ fn broadcast(
|
||||
}
|
||||
let mut blobs = dq.into_iter().collect();
|
||||
|
||||
// appends codes to the list of blobs allowing us to reconstruct the stream
|
||||
#[cfg(feature = "erasure")]
|
||||
{
|
||||
match erasure::generate_coding(recycler, &mut window.write().unwrap(), *transmit_index as usize) {
|
||||
Err(_e) => { return Err(Error::GenericError) }
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
Crdt::index_blobs(crdt, &blobs, transmit_index)?;
|
||||
// keep the cache of blobs that are broadcast
|
||||
{
|
||||
@@ -415,6 +406,15 @@ fn broadcast(
|
||||
}
|
||||
}
|
||||
|
||||
// appends codes to the list of blobs allowing us to reconstruct the stream
|
||||
#[cfg(feature = "erasure")]
|
||||
{
|
||||
match erasure::generate_coding(recycler, &mut window.write().unwrap(), *transmit_index as usize) {
|
||||
Err(_e) => { return Err(Error::GenericError) }
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
Crdt::broadcast(crdt, &window, &sock, transmit_index)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user