> Le 11 août 2019 à 23:37, Jeremiah Breeden <jeremiah.bree...@gmail.com> a 
> écrit :
> 
> I always felt like my suggestion to restart on exception was more of a 
> bandaid.  I really wonder if honestly it just needs a look at the design.  Is 
> it really a good idea to give two independent tasks delete power on the 
> container?  I feel like it is a design problem that the ping operation can 
> delete cursors.  So I would choose option (e), look at the design and see if 
> it can be reorganized.  If not, option (b) would be my second choice, but 
> that's without really knowing how the implementation would work out

Hello Jere,

Regarding option (e), raisons for socket to be created or to be removed are 
multiple and completely asynchrone as they can come from the user (browser 
closing window for instance) or the program (server stoping for instance).
Thus, I try the option (b). It appears to be short, see:
https://sourceforge.net/p/gnoga/code/ci/4663af3a99f0336c650eb872bc9e4a6186f770a9/

If Ping deletes a connection, it is deleted on the main maps and not the 
iterated maps, no ping is sent to the deleted socket and next can be safe on 
the iterated maps.
It can do the job while finding a more complete fix.
I hope this has not yet introduced memory leaks or new side effects.

Feel free to make intensive tests and send feedbacks on the list.

Thanks, Pascal.
http://blady.pagesperso-orange.fr




_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to