Staging belt: do not panic by unwrapping send result in recall (fixes #634) (#636)

This commit is contained in:
myfreeweb authored and GitHub committed 2020-11-24 23:10:48 -05:00
1 parent c1eda83167
commit eced35ecef
1 file changed
+4 -1
+4 -1
View File
@@ -140,7 +140,10 @@ impl StagingBelt {
.buffer
.slice(..)
.map_async(MapMode::Write)
.inspect(move |_| sender.send(chunk).unwrap())
.inspect(move |_| {
// The only possible error is the other side disconnecting, which is fine
let _ = sender.send(chunk);
})
}))
.map(|_| ())
}