matchbox icon indicating copy to clipboard operation
matchbox copied to clipboard

How to make connection status check and auto re-connect with matchbox?

Open tempbottle opened this issue 5 months ago • 4 comments

There are many unwrap() in main/matchbox_socket/src/webrtc_socket/[wasm.rs, native.rs].

When I want to make connection status check and re-connect action, some .unwrap() make panic.

tempbottle avatar Aug 16 '25 05:08 tempbottle

Did you actually encounter any?

johanhelsing avatar Aug 16 '25 06:08 johanhelsing

Thanks for your quickly reply.

Yes. I am making something like re-connection in wasm when network recovery. Got some error in web console:

panicked at /Users/xxx/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/matchbox_socket-0.12.0/src/webrtc_socket/wasm.rs:432:78:
called `Result::unwrap()` on an `Err` value: JsValue(InvalidStateError: Can't create RTCPeerConnections when the network is down

tempbottle avatar Aug 16 '25 08:08 tempbottle

Could you make a separate issue for that? Or change the title of this one?

johanhelsing avatar Aug 18 '25 05:08 johanhelsing

Could you make a separate issue for that? Or change the title of this one?

Done.

tempbottle avatar Sep 14 '25 12:09 tempbottle