Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rise0chen committed Nov 18, 2024
1 parent 1b5bf9a commit 60cbecb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modbus_rtu_slave/bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ async fn main() {

let serial = format!("/dev/ttyS{}",if mb_serial.is_empty(){"1"}else{&mb_serial});
let server_builder = tokio_serial::new(serial, mb_baud_rate.parse().unwrap_or(115200));
let server_serial = tokio_serial::SerialStream::open(&server_builder).unwrap();
let mut server_serial = tokio_serial::SerialStream::open(&server_builder).unwrap();
#[cfg(unix)]
server_serial.set_exclusive(true)?;
server_serial.set_exclusive(true).unwrap();
let server = Server::new(server_serial);

if let Err(err) = server.serve_forever(service).await {
Expand Down
1 change: 1 addition & 0 deletions modbus_rtu_slave/list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"

PLUGIN_CI_LIST=`git ls-files`
Expand Down

0 comments on commit 60cbecb

Please sign in to comment.