diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-05-02 13:44:34 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-05-02 13:45:22 +0200 |
commit | 0dc4110084cf44d830096cca98dde125cda30777 (patch) | |
tree | 97d9ae63f3ac6cd8c8bc7b618f548a3315471ed0 /plugins | |
parent | f33faeac7cda3d23cf39bfbd22da601e6cd57777 (diff) |
plugin_mqtt: Change mainloop signature to use CancellationToken
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/plugin_mqtt/src/plugin.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/plugin_mqtt/src/plugin.rs b/plugins/plugin_mqtt/src/plugin.rs index cf3e480e..89e2781a 100644 --- a/plugins/plugin_mqtt/src/plugin.rs +++ b/plugins/plugin_mqtt/src/plugin.rs @@ -111,7 +111,7 @@ struct State { async fn mqtt_main( mut state: State, - mut stopper: tokio::sync::oneshot::Receiver<()>, + stopper: tedge_api::CancellationToken, ) -> Result<(), PluginError> { use futures::stream::StreamExt; @@ -153,7 +153,7 @@ async fn mqtt_main( } } - _cancel = &mut stopper => { + _cancel = stopper.cancelled() => { break } } |