Fix crash caused by server leave and rejoin

This commit is contained in:
dijunkun
2023-10-11 17:30:29 +08:00
parent 34274001dc
commit 48b1d025fc
3 changed files with 14 additions and 1 deletions

View File

@@ -143,5 +143,8 @@ int IceAgent::SetRemoteGatheringDone() {
}
int IceAgent::Send(const char *data, size_t size) {
if (juice_state_t::JUICE_STATE_COMPLETED != juice_get_state(agent_)) {
return -1;
}
return juice_send(agent_, data, size);
}