SA-MP Forums Archive
Socket still active after restart - Linux - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Socket still active after restart - Linux (/showthread.php?tid=632805)



Socket still active after restart - Linux - nGen.SoNNy - 19.04.2017

Hello, i'm running the Socket plugin on my server and if i use Start / Stop gamepanel function it's ok but if I use Restart the socket will remain active. I have socket_destroy( g_Socket ) at OnGameModeExit.

This is the server.sh i execute on the server:

pkill samp03svr
sleep 5
cd /home/samp
./samp03svr


Re: Socket still active after restart - Linux - Vince - 19.04.2017

The pkill command sends a SIGTERM signal which should tell the application to perform a clean exit but I don't think that SA-MP handles this properly. Check the log if there is a line "server shutting down" which indicates clean shutdown. If the server is not shutdown cleanly then OnGameModeExit is NOT called. In any case, doing an RCON exit is always the safest way.