On 07/30/2018 06:03 AM, Jeremiah Breeden wrote: > In Gnoga.Server.Connection.adb search for the two usages of > Connection_Manager.First. Both will be in a loop. Essentially, one of the > problems is that the First operation saves a cursor form the Map, and the > Connection_Manager.Next tries to iterate on it. However, other tasks can > sometimes delete the element from the Map between those calls. David recently > added a bandaid that I came up with (an Exception Handler around the "Close" > one > to reset the loop if it happens). The Ping one is already in an exception > handler, but the Ping function also calls Delete on the Map, so it can, in > rare > cases, cause some weird crashes. It's a bit of a hairy implementation and > probably needs a revamp.
Usually these things should be atomic, and I don't see a problem with both of these being in Connection_Manager. Ping may delete using the ID that is then passed to Next. I'm not sure what that will do, but it's usually a bad idea. Better is to collect a set of IDs to delete and delete them after the iteration. I haven't tried any of this yet. -- Jeff Carter "My brain hurts!" Monty Python's Flying Circus 21 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list