Delete Service trait (#6921)

This commit is contained in:
Greg Fitzgerald
2019-11-13 11:12:09 -07:00
committed by GitHub
parent 4b1e9ada18
commit a3a830e1ab
35 changed files with 57 additions and 222 deletions

View File

@@ -2,7 +2,6 @@
use crate::rpc_pubsub::{RpcSolPubSub, RpcSolPubSubImpl};
use crate::rpc_subscriptions::RpcSubscriptions;
use crate::service::Service;
use jsonrpc_pubsub::{PubSubHandler, Session};
use jsonrpc_ws_server::{RequestContext, ServerBuilder};
use std::net::SocketAddr;
@@ -15,14 +14,6 @@ pub struct PubSubService {
thread_hdl: JoinHandle<()>,
}
impl Service for PubSubService {
type JoinReturnType = ();
fn join(self) -> thread::Result<()> {
self.thread_hdl.join()
}
}
impl PubSubService {
pub fn new(
subscriptions: &Arc<RpcSubscriptions>,
@@ -64,6 +55,10 @@ impl PubSubService {
pub fn close(self) -> thread::Result<()> {
self.join()
}
pub fn join(self) -> thread::Result<()> {
self.thread_hdl.join()
}
}
#[cfg(test)]