mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Make /api/subscribe hang forever instead of returning no messages
This commit is contained in:
parent
fc01eecdcb
commit
877fd1af35
2 changed files with 12 additions and 9 deletions
|
|
@ -78,16 +78,19 @@ impl ApiService {
|
|||
}
|
||||
};
|
||||
|
||||
let message_queue = self.serve_session.message_queue();
|
||||
let message_cursor = message_queue.cursor();
|
||||
// Temporary response to prevent Rojo plugin from sending too many
|
||||
// requests, this will hang the request until it times out.
|
||||
Box::new(future::empty())
|
||||
|
||||
let messages = Vec::new(); // TODO
|
||||
// let message_queue = self.serve_session.message_queue();
|
||||
// let message_cursor = message_queue.cursor();
|
||||
// let messages = Vec::new();
|
||||
|
||||
json_ok(SubscribeResponse {
|
||||
session_id: self.serve_session.session_id(),
|
||||
message_cursor,
|
||||
messages,
|
||||
})
|
||||
// json_ok(SubscribeResponse {
|
||||
// session_id: self.serve_session.session_id(),
|
||||
// message_cursor,
|
||||
// messages,
|
||||
// })
|
||||
}
|
||||
|
||||
fn handle_api_read(&self, request: Request<Body>) -> <ApiService as Service>::Future {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
collections::{HashMap, HashSet},
|
||||
};
|
||||
|
||||
use rbx_dom_weak::{RbxId, RbxInstance, RbxValue};
|
||||
use rbx_dom_weak::{RbxId, RbxValue};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{session_id::SessionId, snapshot::InstanceWithMeta};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue