Make /api/subscribe hang forever instead of returning no messages

This commit is contained in:
Lucien Greathouse
2019-09-10 16:42:14 -07:00
parent fc01eecdcb
commit 877fd1af35
2 changed files with 12 additions and 9 deletions

View File

@@ -78,16 +78,19 @@ impl ApiService {
} }
}; };
let message_queue = self.serve_session.message_queue(); // Temporary response to prevent Rojo plugin from sending too many
let message_cursor = message_queue.cursor(); // 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 { // json_ok(SubscribeResponse {
session_id: self.serve_session.session_id(), // session_id: self.serve_session.session_id(),
message_cursor, // message_cursor,
messages, // messages,
}) // })
} }
fn handle_api_read(&self, request: Request<Body>) -> <ApiService as Service>::Future { fn handle_api_read(&self, request: Request<Body>) -> <ApiService as Service>::Future {

View File

@@ -5,7 +5,7 @@ use std::{
collections::{HashMap, HashSet}, collections::{HashMap, HashSet},
}; };
use rbx_dom_weak::{RbxId, RbxInstance, RbxValue}; use rbx_dom_weak::{RbxId, RbxValue};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::{session_id::SessionId, snapshot::InstanceWithMeta}; use crate::{session_id::SessionId, snapshot::InstanceWithMeta};