Add TODO.

This commit is contained in:
Johannes Mockenhaupt 2017-09-06 12:53:47 +02:00
parent 09f834d990
commit f4f91c0b85
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -484,6 +484,9 @@ public class RuffyScripter {
// === pump ops === // === pump ops ===
public Menu getCurrentMenu() { public Menu getCurrentMenu() {
long timeout = System.currentTimeMillis() + 5 * 1000; long timeout = System.currentTimeMillis() + 5 * 1000;
// TODO this is probably due to a disconnect and rtDisconnect having nulled currentMenu.
// This here might just work, but needs a more controlled approach when implementing
// something to deal with connection loses
while (currentMenu == null) { while (currentMenu == null) {
if (System.currentTimeMillis() > timeout) { if (System.currentTimeMillis() > timeout) {
throw new CommandException().message("Unable to read current menu"); throw new CommandException().message("Unable to read current menu");