Solve problem #99
This commit is contained in:
parent
6f924efcf4
commit
fe4b98e0a8
|
@ -15,7 +15,7 @@ const CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
|
|||
pub struct WSSubscription<Query, Mutation, Subscription> {
|
||||
schema: Schema<Query, Mutation, Subscription>,
|
||||
hb: Instant,
|
||||
sink: Option<mpsc::Sender<Bytes>>,
|
||||
sink: Option<mpsc::UnboundedSender<Bytes>>,
|
||||
init_context_data: Option<Box<dyn Fn(serde_json::Value) -> FieldResult<Data> + Send + Sync>>,
|
||||
}
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ where
|
|||
&self,
|
||||
transport: T,
|
||||
) -> (
|
||||
mpsc::Sender<Bytes>,
|
||||
mpsc::UnboundedSender<Bytes>,
|
||||
SubscriptionStream<Query, Mutation, Subscription, T>,
|
||||
) {
|
||||
create_connection(self.clone(), transport)
|
||||
|
|
|
@ -56,7 +56,7 @@ pub fn create_connection<Query, Mutation, Subscription, T: SubscriptionTransport
|
|||
schema: Schema<Query, Mutation, Subscription>,
|
||||
transport: T,
|
||||
) -> (
|
||||
mpsc::Sender<Bytes>,
|
||||
mpsc::UnboundedSender<Bytes>,
|
||||
SubscriptionStream<Query, Mutation, Subscription, T>,
|
||||
)
|
||||
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<Query, Mutation, Subscription, T: SubscriptionTran
|
|||
schema: Schema<Query, Mutation, Subscription>,
|
||||
transport: T,
|
||||
streams: SubscriptionStreams,
|
||||
rx_bytes: mpsc::Receiver<Bytes>,
|
||||
rx_bytes: mpsc::UnboundedReceiver<Bytes>,
|
||||
handle_request_fut: Option<HandleRequestBoxFut<T>>,
|
||||
waker: AtomicWaker,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user