From: <tz...@us...> - 2009-02-21 02:42:32
|
Revision: 2836 http://freeorion.svn.sourceforge.net/freeorion/revision/?rev=2836&view=rev Author: tzlaine Date: 2009-02-21 02:42:30 +0000 (Sat, 21 Feb 2009) Log Message: ----------- Changed the order in which ServerNetworking::HandleNextEvent() handles events and removes them from the queue, in order to make event handling reentrant. Modified Paths: -------------- trunk/FreeOrion/network/ServerNetworking.cpp Modified: trunk/FreeOrion/network/ServerNetworking.cpp =================================================================== --- trunk/FreeOrion/network/ServerNetworking.cpp 2009-02-21 00:35:34 UTC (rev 2835) +++ trunk/FreeOrion/network/ServerNetworking.cpp 2009-02-21 02:42:30 UTC (rev 2836) @@ -359,8 +359,9 @@ void ServerNetworking::HandleNextEvent() { if (!m_event_queue.empty()) { - m_event_queue.front()(); + boost::function<void ()> f = m_event_queue.front(); m_event_queue.pop(); + f(); } } |