File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ async fn main() {
215
215
plugins_mgr = plugins_mgr. declare_static_plugin :: < zenoh_plugin_mqtt:: MqttPlugin > ( true ) ;
216
216
217
217
// create a zenoh Runtime.
218
- let runtime = match RuntimeBuilder :: new ( config)
218
+ let mut runtime = match RuntimeBuilder :: new ( config)
219
219
. plugins_manager ( plugins_mgr)
220
220
. build ( )
221
221
. await
@@ -226,11 +226,10 @@ async fn main() {
226
226
std:: process:: exit ( -1 ) ;
227
227
}
228
228
} ;
229
- // create a zenoh Session.
230
- let _session = zenoh:: init ( runtime) . res ( ) . await . unwrap_or_else ( |e| {
231
- println ! ( "{e}. Exiting..." ) ;
229
+ if let Err ( e) = runtime. start ( ) . await {
230
+ println ! ( "Failed to start Zenoh runtime: {e}. Exiting..." ) ;
232
231
std:: process:: exit ( -1 ) ;
233
- } ) ;
232
+ }
234
233
235
234
async_std:: future:: pending :: < ( ) > ( ) . await ;
236
235
}
You can’t perform that action at this time.
0 commit comments