You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a few suggestions maybe can help you figure out something.
First, you can modify the code like:
if ((pc->agent_ret = agent_recv(&pc->agent, pc->agent_buf, sizeof(pc->agent_buf))) > 0) {
codes ...
} else { // do that in else case only, maybe not a good idea.
if (KEEPALIVE_CONNCHECK > 0 && (ports_get_epoch_time() - pc->agent.binding_request_time) > KEEPALIVE_CONNCHECK) {
LOGI("binding request timeout");
STATE_CHANGED(pc, PEER_CONNECTION_CLOSED);
}
}
Second, you can set KEEPALIVE_CONNCHECK to a larger interval, like 90000.
Third, you can see that 'agent->binding_request_time' is set in function 'agent_process_stun_request' when processing STUN_METHOD_BINDING, you can add logs before and after 'stun_msg_is_valid' like 'LOGD("stun request in STUN_METHOD_BINDING:%d", stun_msg->stunmethod);' to check if msg exists.
两个设备属于对称型穿透,采集端的设备使用stun链接,接收端的设备使用turn链接,通过turn服务帮忙转发,发现测试一段时间后流就异常停止了,设备端打印“binding request timeout”,状态切换为closed,问题是必现的,不知是否有什么排查方法。
DEBUG libpeer/src/peer_connection.c 426 agent_recv 70
DEBUG libpeer/src/peer_connection.c 429 Got RTCP packet
DEBUG libpeer/src/peer_connection.c 103 RTCP_PR
DEBUG libpeer/src/peer_connection.c 119 RTCP_PSFB 15
DEBUG libpeer/src/peer_connection.c 426 agent_recv 70
DEBUG libpeer/src/peer_connection.c 429 Got RTCP packet
DEBUG libpeer/src/peer_connection.c 103 RTCP_PR
DEBUG libpeer/src/peer_connection.c 119 RTCP_PSFB 15
DEBUG libpeer/src/peer_connection.c 426 agent_recv 70
DEBUG libpeer/src/peer_connection.c 429 Got RTCP packet
DEBUG libpeer/src/peer_connection.c 103 RTCP_PR
DEBUG libpeer/src/peer_connection.c 119 RTCP_PSFB 15
DEBUG libpeer/src/peer_connection.c 426 agent_recv 61
DEBUG libpeer/src/dtls_srtp.c 485 DTLS content type: 23
DEBUG libpeer/src/peer_connection.c 435 Got DTLS data 32
DEBUG libpeer/src/sctp.c 451 Data of length 4 received on stream 0 with SSN 39, TSN 703256564, PPID 51
DEBUG libpeer/src/sctp.c 401 Got message (size = 4)
on message: 0 ping, send pong
DEBUG libpeer/src/peer_connection.c 426 agent_recv 70
DEBUG libpeer/src/peer_connection.c 429 Got RTCP packet
DEBUG libpeer/src/peer_connection.c 103 RTCP_PR
DEBUG libpeer/src/peer_connection.c 119 RTCP_PSFB 15
DEBUG libpeer/src/peer_connection.c 426 agent_recv 57
DEBUG libpeer/src/dtls_srtp.c 485 DTLS content type: 23
DEBUG libpeer/src/peer_connection.c 435 Got DTLS data 28
DEBUG libpeer/src/sctp.c 451 Data of length 12 received on stream 0 with SSN 0, TSN 0, PPID 0
DEBUG libpeer/src/peer_connection.c 426 agent_recv 70
DEBUG libpeer/src/peer_connection.c 429 Got RTCP packet
DEBUG libpeer/src/peer_connection.c 103 RTCP_PR
DEBUG libpeer/src/peer_connection.c 119 RTCP_PSFB 15
DEBUG libpeer/src/peer_connection.c 426 agent_recv 70
DEBUG libpeer/src/peer_connection.c 429 Got RTCP packet
DEBUG libpeer/src/peer_connection.c 103 RTCP_PR
DEBUG libpeer/src/peer_connection.c 119 RTCP_PSFB 15
INFO libpeer/src/peer_connection.c 459 binding request timeout
state is changed: closed
The text was updated successfully, but these errors were encountered: