relay_loop().await from main relay function (#829)

This commit is contained in:
Svyatoslav Nikolsky
2021-03-16 13:31:53 +03:00
committed by Bastian Köcher
parent 4cd6d128ea
commit c95b1eb970
16 changed files with 163 additions and 166 deletions
@@ -206,7 +206,7 @@ pub struct ClientsState<P: MessageLane> {
}
/// Run message lane service loop.
pub fn run<P: MessageLane>(
pub async fn run<P: MessageLane>(
params: Params,
source_client: impl SourceClient<P>,
target_client: impl TargetClient<P>,
@@ -251,7 +251,8 @@ pub fn run<P: MessageLane>(
exit_signal.clone(),
)
},
);
)
.await;
}
/// Run one-way message delivery loop until connection with target or source node is lost, or exit signal is received.