About Disconnect() in Network::ThreadRun()

Matthieu Fertré a écrit :
> Well, it break at least the weapon menu.

Currently, this "fix" is wrong anyway, as it frees twice the same object
(add a printf("%p\n", singleton) in Disconnect() to verify this).

> For example, you can try to start a server. Then connect to it with a 
> client (but stay in the menu), then quit the server. The client should 
> go back to the main menu but in fact it stays in the network game menu.

Currently, can't reproduce when this Disconnect() is removed.

And once removed, no double-delete (from both a printf and a valgrind
report).

If that breaks something else, I'm still convinced letting this
Disconnect here is the wrong way to fix the breaking, having seen this.

Best regards,
-- 
Kurosu

_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à