Check ice status by using ice_transmission::state_ instead of nice_agent_get_component_state() method

This commit is contained in:
dijunkun
2024-06-14 13:43:21 +08:00
parent c575a9170c
commit 28fb35faf5
2 changed files with 25 additions and 5 deletions

View File

@@ -228,11 +228,11 @@ int IceAgent::Send(const char *data, size_t size) {
return -1;
}
if (NiceComponentState::NICE_COMPONENT_STATE_READY !=
nice_agent_get_component_state(agent_, stream_id_, 1)) {
LOG_ERROR("Nice agent not ready");
return -1;
}
// if (NiceComponentState::NICE_COMPONENT_STATE_READY !=
// nice_agent_get_component_state(agent_, stream_id_, 1)) {
// LOG_ERROR("Nice agent not ready");
// return -1;
// }
nice_agent_send(agent_, stream_id_, 1, size, data);
return 0;