diff --git a/async-graphql-actix-web/src/subscription.rs b/async-graphql-actix-web/src/subscription.rs index b74d4fcb..2ede7a42 100644 --- a/async-graphql-actix-web/src/subscription.rs +++ b/async-graphql-actix-web/src/subscription.rs @@ -15,7 +15,7 @@ const CLIENT_TIMEOUT: Duration = Duration::from_secs(10); pub struct WSSubscription { schema: Schema, hb: Instant, - sink: Option>, + sink: Option>, init_context_data: Option FieldResult + Send + Sync>>, } diff --git a/src/schema.rs b/src/schema.rs index 60eac1cc..f2d58c85 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -338,7 +338,7 @@ where &self, transport: T, ) -> ( - mpsc::Sender, + mpsc::UnboundedSender, SubscriptionStream, ) { create_connection(self.clone(), transport) diff --git a/src/subscription/connection.rs b/src/subscription/connection.rs index 99d17af7..8f5b1b33 100644 --- a/src/subscription/connection.rs +++ b/src/subscription/connection.rs @@ -56,7 +56,7 @@ pub fn create_connection, transport: T, ) -> ( - mpsc::Sender, + mpsc::UnboundedSender, SubscriptionStream, ) where @@ -64,7 +64,7 @@ where Mutation: ObjectType + Sync + Send + 'static, Subscription: SubscriptionType + Sync + Send + 'static, { - let (tx_bytes, rx_bytes) = mpsc::channel(8); + let (tx_bytes, rx_bytes) = mpsc::unbounded(); ( tx_bytes, SubscriptionStream { @@ -94,7 +94,7 @@ pub struct SubscriptionStream, transport: T, streams: SubscriptionStreams, - rx_bytes: mpsc::Receiver, + rx_bytes: mpsc::UnboundedReceiver, handle_request_fut: Option>, waker: AtomicWaker, }