fix: remove batched json rpc support (#408)
* fix: remove batched json rpc support * fix(test): fix schema
This commit is contained in:
parent
7d46b39b49
commit
f381c2b899
2 changed files with 2 additions and 3497 deletions
|
|
@ -468,10 +468,6 @@ impl LocalSessionWorker {
|
|||
OutboundChannel::Common
|
||||
}
|
||||
}
|
||||
ServerJsonRpcMessage::BatchRequest(_) | ServerJsonRpcMessage::BatchResponse(_) => {
|
||||
// the server side should never yield a batch request or response now
|
||||
unreachable!("server side won't yield batch request or response")
|
||||
}
|
||||
}
|
||||
}
|
||||
async fn handle_server_message(
|
||||
|
|
@ -824,20 +820,6 @@ impl Worker for LocalSessionWorker {
|
|||
crate::model::JsonRpcMessage::Notification(notification) => {
|
||||
self.catch_cancellation_notification(notification)
|
||||
}
|
||||
crate::model::JsonRpcMessage::BatchRequest(items) => {
|
||||
for r in items {
|
||||
match r {
|
||||
crate::model::JsonRpcBatchRequestItem::Request(request) => {
|
||||
if let Some(http_request_id) = http_request_id {
|
||||
self.register_request(request, http_request_id)
|
||||
}
|
||||
}
|
||||
crate::model::JsonRpcBatchRequestItem::Notification(
|
||||
notification,
|
||||
) => self.catch_cancellation_notification(notification),
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
context.send_to_handler(json_rpc_message).await?;
|
||||
|
|
|
|||
|
|
@ -319,12 +319,6 @@ where
|
|||
.map_err(internal_error_response("accept message"))?;
|
||||
Ok(accepted_response())
|
||||
}
|
||||
_ => Ok(Response::builder()
|
||||
.status(http::StatusCode::NOT_IMPLEMENTED)
|
||||
.body(
|
||||
Full::new(Bytes::from("Batch requests are not supported yet")).boxed(),
|
||||
)
|
||||
.expect("valid response")),
|
||||
}
|
||||
} else {
|
||||
let (session_id, transport) = self
|
||||
|
|
@ -427,10 +421,6 @@ where
|
|||
}
|
||||
ClientJsonRpcMessage::Response(_json_rpc_response) => Ok(accepted_response()),
|
||||
ClientJsonRpcMessage::Error(_json_rpc_error) => Ok(accepted_response()),
|
||||
_ => Ok(Response::builder()
|
||||
.status(http::StatusCode::NOT_IMPLEMENTED)
|
||||
.body(Full::new(Bytes::from("Batch requests are not supported yet")).boxed())
|
||||
.expect("valid response")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue