instrumentisto / medea-jason

Mozilla Public License 2.0
2 stars 2 forks source link

Fix multi-room functional #175

Closed evdokimovs closed 5 months ago

evdokimovs commented 5 months ago

Synopsis

The issue occurs when a RoomHandle is created and joined, another RoomHandle is created without joining, and then the first RoomHandle is closed. Any operations on the second RoomHandle (such as unmuteAudio or join) result in an error. This happens on both macOS and in the browser (during in-window calls). Currently, the error originates from the unmuteAudio method, but it will also occur from joinRoom if no other actions are taken.

Solution

This issue happens, because Jason has support for reusing one WebSocket for multiple Rooms, but it looks unsupported on the server side. It can be implemented, but this feature doesn't make too much difference, so best solution at this moment is just to create new WebSocket for each Room.

Checklist

evdokimovs commented 5 months ago

FCM

Fix multi-`Room` functional (#175)

- remove `Jason::with_rpc_client()` constructor 
- add `WebSocketRpcClient` as argument to `Jason::new()` constructor