File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 17
17
18
18
use crate :: { net:: ResponseFuture , protocol:: remoting_command:: RemotingCommand , runtime:: RPCHook } ;
19
19
20
+ #[ allow( async_fn_in_trait) ]
20
21
pub trait RemotingService : Send {
21
- fn start ( & mut self ) -> impl std :: future :: Future < Output = ( ) > + Send ;
22
+ async fn start ( & mut self ) ;
22
23
23
24
fn shutdown ( & mut self ) ;
24
25
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ impl RocketmqDefaultServer {
46
46
}
47
47
48
48
impl RemotingService for RocketmqDefaultServer {
49
- fn start ( & mut self ) -> impl std :: future :: Future < Output = ( ) > + Send {
49
+ async fn start ( & mut self ) {
50
50
let address = self . broker_server_config . bind_address . as_str ( ) ;
51
51
let port = self . broker_server_config . listen_port ;
52
52
let listener = block_on ( async move {
@@ -70,6 +70,7 @@ impl RemotingService for RocketmqDefaultServer {
70
70
processor_table,
71
71
Some ( notify_conn_disconnect) ,
72
72
)
73
+ . await
73
74
}
74
75
75
76
fn shutdown ( & mut self ) { }
You can’t perform that action at this time.
0 commit comments