File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments