lynckia / licode

Open Source Communication Provider based on WebRTC and Cloud technologies
http://lynckia.com/licode
MIT License
3.09k stars 1.02k forks source link

Error on the Erizo code about the NiceConnection creation. #17

Closed cdai2 closed 11 years ago

cdai2 commented 11 years ago

In the init() function of NiceConnection.cpp file, the "loop" variable is created with NULL as the context parameter as the following.
loop
= g_main_loop_new(NULL, FALSE);

This will leads to that the all agents will be created with the same context and the first agent will handle all the data from network under multi-thread environment.

our proposal fixing is that: loop_ = g_main_loop_new(g_main_context_new(), FALSE);

You may refer the the multi-thread sample code in libnice code.

lodoyun commented 11 years ago

It looks like you are right :) We are testing this in the cleanup branch.