Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/peer_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ int peer_connection_loop(PeerConnection* pc) {
}
#endif

if ((pc->agent_ret = agent_recv(&pc->agent, pc->agent_buf, sizeof(pc->agent_buf))) > 0) {
while ((pc->agent_ret = agent_recv(&pc->agent, pc->agent_buf, sizeof(pc->agent_buf))) > 0) {
LOGD("agent_recv %d", pc->agent_ret);

if (rtcp_probe(pc->agent_buf, pc->agent_ret)) {
Expand All @@ -484,6 +484,7 @@ int peer_connection_loop(PeerConnection* pc) {

if (ret > 0) {
sctp_incoming_data(&pc->sctp, (char*)pc->temp_buf, ret);
continue;
}

} else if (rtp_packet_validate(pc->agent_buf, pc->agent_ret)) {
Expand All @@ -501,6 +502,7 @@ int peer_connection_loop(PeerConnection* pc) {
} else {
LOGW("Unknown data");
}
break;
}

if (KEEPALIVE_CONNCHECK > 0 && (ports_get_epoch_time() - pc->agent.binding_request_time) > KEEPALIVE_CONNCHECK) {
Expand Down Expand Up @@ -653,3 +655,4 @@ int peer_connection_add_ice_candidate(PeerConnection* pc, char* candidate) {
agent->remote_candidates_count++;
return 0;
}