Closed GoogleCodeExporter closed 9 years ago
i have replaced it with this
lock (m_handshakes)
{
// foreach (NetConnection conn in m_handshakes.Values )
// conn.Shutdown(m_shutdownReason);
// create a temporary list
List<NetConnection> conns = new List<NetConnection>();
foreach( NetConnection conn in m_handshakes.Values )
{
conns.Add( conn );
}
// iterate through the list. this is safe since the list will not be modified
during // enumeration. only the dictionary will.
foreach( NetConnection conn in conns )
{
conn.Shutdown( m_shutdownReason );
}
}
which gets rid of the exception but i don't understand the rest of your code
enough (you have similar dictionaries and lists of connections) to determine if
this is a full solution or not.
you may want to check your use of all of your dictionaries for similar issues.
Original comment by xy5...@gmail.com
on 10 Mar 2011 at 1:15
Nice catch! Fixed in rev 191 - thanks!
Original comment by lidg...@gmail.com
on 10 Mar 2011 at 6:45
Original issue reported on code.google.com by
xy5...@gmail.com
on 10 Mar 2011 at 12:35