cgo libnice binding will stuck when call nice_agent_gather_candidates on macos
I try to use cgo binding libnice to do p2p transport, It seems the cgo binding will stuck on macos.
It works fun on linux.
I am not sure it is bug for libnice or cgo or macos?
func (a *Agent) GatherCandidates() error {
a.mtx.Lock()
defer a.mtx.Unlock()
fmt.Println("GatherCandidates11111")
rv := int(C.nice_agent_gather_candidates(a.agent, C.guint(a.stream)))
if rv == 0 {
return errors.New("failed to gather candidates")
}
fmt.Println("GatherCandidates22222")
return nil
}