Connection issues

If either

  1. latency is 0 (which means auth is disconnected) or
  2. latency is above the specified threshold or
  3. the “Board request sent for more than 30seconds ago,trying to resend request” message appears,

MDisconnectSaver will stop SB after the current game and wait. When there haven’t been any of these signs of lag for 15 minutes,¬†MDisconnectSaver will start SB again. Don’t forget to enable it in the SB plugin settings.

This should prevent you from losing more than one game due to server issues.

Local flow issues

SB occasionally gets into situations where the flow is broken, i.e. it is stuck,¬† but the built-in relogger doesn’t recognize that. This happens when Hearthstone is running but frozen, the relogger has been disabled through the API in an unfortunate moment, hearthstone is closed but the relogger doesn’t recognize that.

For these issues I added a timeout detection.¬†When the bot is running (started) and there hasn’t been anything written to the log for more than 5 minutes, MDisconnectSaver will close Hearthstone and start the Smartbot relogger. This won’t save your current game, but it will atleast get Smartbot going again so that it doesn’t sit idle for hours while you’re away, expecting it to work.

For this to work plugins need to adhere to three rules:

  • Don’t send messages to the log peridically/on a timer, but instead on events such as a game starting or similar. Otherwise MDisconnectSaver might be unable to detect a timeout.
  • During long times of intended inactivity, either stop the bot (through the API) or send a message to the log every now and then.
  • When you stop the bot it is your “responsibility” to start it again if you want it to continue.

In the vast majority of cases plugin naturally follow these rules because they are mostly just common sense and you would want this behavior anyway. The one exception are plugins for long breaks during botting. Other than that feature in MAS3, I think there is only BreakAfterXTime.

Get it using my updater.