Skip to content

Commit 715cf0c

Browse files
committed
wasm module version update
1 parent 8d3a94d commit 715cf0c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

mbus-ffi/javascript/dist/npm/wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modbus-rs-wasm",
3-
"version": "0.15.8",
3+
"version": "0.16.0",
44
"description": "Modbus TCP/RTU/ASCII client & server for the browser, powered by Rust + WebAssembly",
55
"type": "module",
66
"exports": {

mbus-ffi/src/wasm/client/client_tcp.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,12 @@ impl WasmWsTransport {
165165
///
166166
/// All subsequent requests on clients created from this transport will fail.
167167
#[wasm_bindgen]
168-
pub async fn close(&mut self) {
168+
pub fn close(&mut self) -> Promise {
169169
// Drop the cmd_tx sender to terminate the task
170170
*self.cmd_tx.borrow_mut() = futures_channel::mpsc::unbounded::<WasmCommand>().0;
171171
self.pending_count.set(0);
172172
*self.active_transport.borrow_mut() = None;
173+
Promise::resolve(&JsValue::UNDEFINED)
173174
}
174175

175176
/// Sets a temporary request timeout override (in milliseconds) for all clients of this transport.

0 commit comments

Comments
 (0)