Skip to content

Commit

Permalink
Fix for failing build
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed Aug 1, 2021
1 parent 6d4dd1e commit fade500
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ impl Session {
info!("Run session was terminated by a message {:?}", message);
}
else {
debug!("Run session receiver is terminated, presumably by caller dropping oneshot");
warn!("Run session was terminated, presumably by caller dropping oneshot sender. Don't do that unless you meant to.");
}
}
}
Expand Down
1 change: 1 addition & 0 deletions samples/web-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
pico-args = "0.3"
tokio = { version = "~1.8", features = ["full"] }

[dependencies.opcua-client]
path = "../../client"
Expand Down
7 changes: 3 additions & 4 deletions samples/web-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern crate serde_derive;

use std::{
str::FromStr,
sync::{mpsc, Arc, RwLock},
sync::{Arc, RwLock},
time::{Duration, Instant},
};

Expand Down Expand Up @@ -94,7 +94,7 @@ struct OPCUASession {
/// The OPC UA session
session: Option<Arc<RwLock<Session>>>,
/// A sender that the session can use to terminate the corresponding OPC UA session
session_tx: Option<mpsc::Sender<SessionCommand>>,
session_tx: Option<tokio::sync::oneshot::Sender<SessionCommand>>,
}

impl Actor for OPCUASession {
Expand Down Expand Up @@ -243,11 +243,10 @@ impl OPCUASession {
session.disconnect();
}
}
if let Some(ref tx) = self.session_tx {
if let Some(mut tx) = self.session_tx.take() {
let _ = tx.send(SessionCommand::Stop);
}
self.session = None;
self.session_tx = None;
}

fn lhs_operand(op: &str) -> Operand {
Expand Down

0 comments on commit fade500

Please sign in to comment.