From: Ian Jackson Date: Mon, 17 May 2021 13:08:05 +0000 (+0100) Subject: mgmtchannel: Add threadsafety bounds to the bulk writer X-Git-Tag: otter-0.6.0~205 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dce4c79b9abca555e68ee282bfc4bb7a19ac3e80;p=otter.git mgmtchannel: Add threadsafety bounds to the bulk writer Acked-by: Ian Jackson --- diff --git a/src/mgmtchannel.rs b/src/mgmtchannel.rs index 962e78db..a40d961c 100644 --- a/src/mgmtchannel.rs +++ b/src/mgmtchannel.rs @@ -58,7 +58,7 @@ impl MgmtChannel { #[throws(AE)] pub fn new(conn: U) -> MgmtChannel - where U: IoTryClone + Read + Write + IntoRawFd + 'static, + where U: IoTryClone + Read + Write + IntoRawFd + Send + 'static, { let read = conn.try_clone().context("dup the command stream")?; let read = TimedFdReader::new(read).context("set up timed reader")?; @@ -73,7 +73,7 @@ impl MgmtChannel { up: &mut U, down: &mut D, progress: &mut dyn termprogress::Reporter) -> MgmtResponse - where U: Read, D: Write, + where U: Read + Send, D: Write, { use MgmtResponse::*; let mut wbulk = self.write