Fix(net): eviter le SIGSEGV a l extinction (SocketMgr::StopNetwork null acceptor)
Main.cpp appelle sToolSocketMgr.StopNetwork() inconditionnellement a l arret, mais ToolSocketMgr::StartNetwork() n est jamais appele -> _acceptor reste nullptr -> _acceptor->Close() deref null -> SIGSEGV a CHAQUE extinction (coredumps recurrents, port libere lentement => bind-fail au relaunch). Fix : garder _acceptor->Close() derriere un test de nullite dans SocketMgr::StopNetwork() (aligne upstream TC). Verifie par comptage de coredumps : arret de l ancien binaire = +1 crash, arret du nouveau = 0 crash, et port libere en ~1s au lieu de ~51s. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,10 @@ public:
|
||||
|
||||
virtual void StopNetwork()
|
||||
{
|
||||
_acceptor->Close();
|
||||
// _acceptor est nul si StartNetwork n a jamais reussi (ex. ToolSocketMgr
|
||||
// jamais demarre) -> ne pas dereferencer, sinon SIGSEGV a l extinction.
|
||||
if (_acceptor)
|
||||
_acceptor->Close();
|
||||
|
||||
if (_threadCount != 0)
|
||||
for (int32 i = 0; i < _threadCount; ++i)
|
||||
|
||||
Reference in New Issue
Block a user