Code Monkey home page Code Monkey logo

Comments (3)

Sean-Der avatar Sean-Der commented on July 21, 2024

@zhiyua-git is this the signaling that times out, or something in the PeerConnection itself?

from amazon-kinesis-video-streams-webrtc-sdk-c.

zhiyua-git avatar zhiyua-git commented on July 21, 2024

This is the end of log of failure case:

2019-12-12 20:14:05 VERBOSE lwsWssCallbackRoutine(): Client is writable
2019-12-12 20:14:05 DEBUG   turnConnectionStepState(): Relay address received: 54.189.134.250, port: 62148
2019-12-12 20:14:05 DEBUG   turnConnectionStepState(): TurnConnection state changed from TURN_STATE_ALLOCATION to TURN_STATE_CREATE_PERMISSION
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): Allocation life time is 600 seconds
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): TURN Allocation succeeded. Allocation expiration epoch 157618224535456
2019-12-12 20:14:05 DEBUG   onIceCandidateHandler(): ice candidate gathering finished
2019-12-12 20:14:05 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000004
2019-12-12 20:14:05 DEBUG   executeCheckConnectionIceAgentState(): ice candidate pair count 9
2019-12-12 20:14:05 DEBUG   stepIceAgentStateMachine(): Ice agent state changed from ICE_AGENT_STATE_GATHERING to ICE_AGENT_STATE_CHECK_CONNECTION.
2019-12-12 20:14:05 DEBUG   onConnectionStateChange(): New connection state 2
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 8
2019-12-12 20:14:05 VERBOSE lwsWssCallbackRoutine(): Client receive 
2019-12-12 20:14:05 VERBOSE receiveLwsMessage(): Signaling received an empty message
2019-12-12 20:14:05 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 10
2019-12-12 20:14:05 VERBOSE lwsWssCallbackRoutine(): Client is writable
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): create permission succeeded for peer 54.202.170.151
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): create permission succeeded for peer 50.234.50.206
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): Channel bind succeeded with peer 54.202.170.151, port: 58699, channel number 16385
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): Channel bind succeeded with peer 50.234.50.206, port: 40662, channel number 16386
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): create permission succeeded for peer 192.168.57.200
2019-12-12 20:14:05 DEBUG   turnConnectionSendData(): no turn peer to send or turn peer not ready
2019-12-12 20:14:05 DEBUG   turnConnectionHandleStun(): Channel bind succeeded with peer 192.168.57.200, port: 40662, channel number 16387
2019-12-12 20:14:05 DEBUG   iceAgentSendPacket(): No valid ice candidate pair available to send data
2019-12-12 20:14:07 DEBUG   turnConnectionStepState(): TurnConnection state changed from TURN_STATE_CREATE_PERMISSION to TURN_STATE_BIND_CHANNEL
2019-12-12 20:14:07 DEBUG   turnConnectionStepState(): TurnConnection state changed from TURN_STATE_BIND_CHANNEL to TURN_STATE_READY
2019-12-12 20:14:07 DEBUG   iceAgentSendPacket(): No valid ice candidate pair available to send data
2019-12-12 20:14:10 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000004, Next state: 0x0000000000000040
2019-12-12 20:14:10 DEBUG   executeDisconnectedIceAgentState(): Ice agent detected disconnection. current state ICE_AGENT_STATE_CHECK_CONNECTION
2019-12-12 20:14:10 DEBUG   onConnectionStateChange(): New connection state 4
2019-12-12 20:14:10 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000040, Next state: 0x0000000000000004
2019-12-12 20:14:10 DEBUG   main(): Shutdown flag detected
2019-12-12 20:14:12 DEBUG   main(): Completed freeing peerConnection and Reinitializing peerConnection
2019-12-12 20:14:12 VERBOSE signalingClientGetIceConfigInfoCout(): Signaling Client Get ICE Config Info Count
2019-12-12 20:14:12 VERBOSE signalingClientGetIceConfigInfo(): Signaling Client Get ICE Config Info
2019-12-12 20:14:12 VERBOSE signalingClientGetIceConfigInfo(): Signaling Client Get ICE Config Info
2019-12-12 20:14:12 DEBUG   stepIceAgentStateMachine(): Ice agent state changed from ICE_AGENT_STATE_NONE to ICE_AGENT_STATE_NEW.
2019-12-12 20:14:15 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 10
2019-12-12 20:14:15 VERBOSE lwsWssCallbackRoutine(): Client is writable
2019-12-12 20:14:15 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 9
2019-12-12 20:14:25 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 10
2019-12-12 20:14:25 VERBOSE lwsWssCallbackRoutine(): Client is writable
2019-12-12 20:14:25 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 9
2019-12-12 20:14:35 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 10
2019-12-12 20:14:35 VERBOSE lwsWssCallbackRoutine(): Client is writable
2019-12-12 20:14:35 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 9

from amazon-kinesis-video-streams-webrtc-sdk-c.

chehefen avatar chehefen commented on July 21, 2024

The root cause is that ice was checking for disconnection in ICE_AGENT_STATE_CHECK_CONNECTION. If turn takes longer time to setup then there would be no incoming traffic and the disconnection check could be triggered. The solution is to only check for disconnection once ice reached ready state which was done in this commit: 59236d7#diff-ae9f20bba13c2cc13530d43ff3b2acaa

from amazon-kinesis-video-streams-webrtc-sdk-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.