We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46639ce commit 5f2fcb7Copy full SHA for 5f2fcb7
wg-webclient/src/wg_client.rs
@@ -248,6 +248,7 @@ impl WgClient {
248
* Creates a new Websocket object and connection that gets stored internally.
249
*/
250
fn start_inner_ws(&mut self, cb: js_sys::Function) {
251
+ self.disconnect_inner_ws();
252
let mut stream = TcpStream::new(self.iface.clone());
253
let port = js_sys::Math::random() * 1000.0;
254
let port = port as u16;
@@ -616,7 +617,6 @@ impl WgClient {
616
617
}
618
619
pub fn disconnect_inner_ws(&mut self) {
- log::debug!("disconnecting inner ws");
620
let mut sock_ref = self.websocket.borrow_mut();
621
if let Some(socket) = &*sock_ref {
622
socket.disconnect();
0 commit comments