[Pogamut-list] Gracefully Stop Bot

michal.bida pogamut-forum at diana.ms.mff.cuni.cz
Mon Jul 2 21:34:20 CEST 2012


Re: Gracefully Stop Bot

Author: michal.bida

Just a quick answer, before Jakub answers more thoroughly. There are two methods for this in Pogamut. First one is bot.stop(); that should stop execution of the bot gracefully. Second one is a drastic bot.kill(); that just shuts everything down. However, both methods WILL produce FatalErrors in components - but those are basically only notifications of Pogamut shutting down (components discovered that Pogamut is shutting down). 
Alternatively, you can use GameBots command getAct().act(new DisconnectBot()); that shuts down connection from the other side (Unreal side) - sometimes this can work more reliably in a sense that no socket connections remains hanging in the system (we had a minor issue that when using UnrealEngine2Runtime and stop command, sometimes socket connection remained active in JVM somewhere, preventing the bot to be disconnected from server). You can use this DisconnectBot command also for ControlServer connection. This will also produce FatalErrors, but bot and server should be shut down properly.
Jakub, your turn. :-)

Best,
Michal

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=988&post_reply=1#form>




More information about the Pogamut-list mailing list