Asynchronous RPC support (#2017)
* Async RPC * Limiting number of transactions in queue * Fixing tests * Bumping serde and jsonrpc-core * serde updated to 0.8 * fixed failing tests * Bumping ipc server * Fixing API for endpoints * Experimenting with tests without --release mode
This commit is contained in:
committed by
Arkadiy Paronyan
parent
ca03cfa58a
commit
b4f3c4bd7a
@@ -26,7 +26,7 @@ use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool};
|
||||
use rustc_serialize::hex::FromHex;
|
||||
|
||||
use hyper::Control;
|
||||
use hyper;
|
||||
use hyper::status::StatusCode;
|
||||
|
||||
use random_filename;
|
||||
@@ -85,7 +85,7 @@ impl<R: URLHint> AppFetcher<R> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_handler(&self, path: EndpointPath, control: Control) -> Box<Handler> {
|
||||
pub fn to_async_handler(&self, path: EndpointPath, control: hyper::Control) -> Box<Handler> {
|
||||
let mut dapps = self.dapps.lock();
|
||||
let app_id = path.app_id.clone();
|
||||
|
||||
@@ -94,7 +94,7 @@ impl<R: URLHint> AppFetcher<R> {
|
||||
match status {
|
||||
// Just server dapp
|
||||
Some(&mut ContentStatus::Ready(ref endpoint)) => {
|
||||
(None, endpoint.to_handler(path))
|
||||
(None, endpoint.to_async_handler(path, control))
|
||||
},
|
||||
// App is already being fetched
|
||||
Some(&mut ContentStatus::Fetching(_)) => {
|
||||
|
||||
Reference in New Issue
Block a user