Skip to content

Commit a5e2e09

Browse files
fix types
1 parent eb701bc commit a5e2e09

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/room.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ bool Room::disconnect(DisconnectReason reason) {
217217

218218
std::shared_ptr<FfiHandle> handle;
219219
RoomDelegate* delegate_snapshot = nullptr;
220-
std::unique_ptr<LocalParticipant> local_participant_to_cleanup;
220+
std::shared_ptr<LocalParticipant> local_participant_to_cleanup;
221221
std::unordered_map<std::string, std::shared_ptr<RemoteParticipant>> remote_participants_to_clear;
222-
std::unique_ptr<E2EEManager> e2ee_manager_to_clear;
222+
std::shared_ptr<E2EEManager> e2ee_manager_to_clear;
223223
std::unordered_map<std::string, std::shared_ptr<TextStreamReader>> text_stream_readers_to_clear;
224224
std::unordered_map<std::string, std::shared_ptr<ByteStreamReader>> byte_stream_readers_to_clear;
225225
int listener_to_remove = 0;

src/tests/integration/test_room.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ TEST_F(RoomTest, UserDisconnect) {
100100
RoomOptions options;
101101
ASSERT_TRUE(room.connect(server_url_, token_, options)) << "connect failed";
102102
ASSERT_EQ(room.connectionState(), ConnectionState::Connected);
103-
ASSERT_NE(room.localParticipant(), nullptr);
103+
ASSERT_NE(room.localParticipant().lock(), nullptr);
104104

105105
EXPECT_NO_THROW(room.disconnect()) << "disconnect should not throw on a connected room";
106106
EXPECT_EQ(room.connectionState(), ConnectionState::Disconnected);
107-
EXPECT_EQ(room.localParticipant(), nullptr) << "local participant should be cleared after disconnect";
107+
EXPECT_EQ(room.localParticipant().lock(), nullptr) << "local participant should be cleared after disconnect";
108108
EXPECT_EQ(delegate.count.load(), 1) << "onDisconnected should fire exactly once";
109109
EXPECT_EQ(delegate.last_reason, DisconnectReason::ClientInitiated);
110110

0 commit comments

Comments
 (0)