rawrtc / rawrtc-data-channel

A standalone WebRTC and ORTC data channel implementation.
BSD 2-Clause "Simplified" License
52 stars 6 forks source link

Maybe don't need call usrsctp_handle_timers in usrsctp #31

Closed lxlenovostar closed 5 years ago

lxlenovostar commented 5 years ago

sctp_handle_tick will call in usrsctp in the following order:

usrsctp_init==>
        sctp_init==>
                  sctp_start_timer==>  
                              user_sctp_timer_iterate===>
                                                       sctp_handle_tick

So sctp_start_timer already call sctp_handle_tick, we don't need call sctp_handle_tick by usrsctp_handle_timers. This is right?

lgrahl commented 5 years ago

No. sctp_start_timer starts a thread and usrsctp threads are disabled when used by RAWRTC. Otherwise it would not work well with an event loop.