aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/examples/tokio_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'jsonrpc/examples/tokio_server/src')
-rw-r--r--jsonrpc/examples/tokio_server/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/jsonrpc/examples/tokio_server/src/main.rs b/jsonrpc/examples/tokio_server/src/main.rs
index ce77cd3..d70a46a 100644
--- a/jsonrpc/examples/tokio_server/src/main.rs
+++ b/jsonrpc/examples/tokio_server/src/main.rs
@@ -1,4 +1,4 @@
-use std::sync::Arc;
+use std::{sync::Arc, time::Duration};
use serde::{Deserialize, Serialize};
use serde_json::Value;
@@ -56,5 +56,7 @@ async fn main() {
.expect("start a new server");
// Start the server
- server.start().await.unwrap();
+ server.start().await;
+
+ tokio::time::sleep(Duration::MAX).await;
}