From 9261259f0bfb50a02187c0c29b553b61c2b04491 Mon Sep 17 00:00:00 2001 From: "Franz Heinzmann (Frando)" Date: Tue, 11 Jun 2024 19:17:12 +0200 Subject: [PATCH] make builder send again --- iroh/src/node/builder.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iroh/src/node/builder.rs b/iroh/src/node/builder.rs index c0668c7843..b7f5a9aded 100644 --- a/iroh/src/node/builder.rs +++ b/iroh/src/node/builder.rs @@ -57,7 +57,10 @@ const MAX_CONNECTIONS: u32 = 1024; const MAX_STREAMS: u64 = 10; pub(super) type ProtocolMap = Arc>>>; -type ProtocolBuilders = Vec<(&'static [u8], Box) -> Arc>)>; +type ProtocolBuilders = Vec<( + &'static [u8], + Box) -> Arc + Send + 'static>, +)>; /// Builder for the [`Node`]. /// @@ -358,7 +361,7 @@ where pub fn accept( mut self, alpn: &'static [u8], - protocol: impl FnOnce(Node) -> Arc + 'static, + protocol: impl FnOnce(Node) -> Arc + Send + 'static, ) -> Self { self.protocols.push((alpn, Box::new(protocol))); self