client session manager: fix task crash from being unable to acquire a session id

This commit is contained in:
Adam
2019-11-10 13:38:39 -05:00
parent 560a738845
commit 7f68db7362

View File

@@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import net.runelite.client.util.RunnableExceptionLogger;
@Singleton
@Slf4j
@@ -62,7 +63,7 @@ public class ClientSessionManager
log.warn("error opening session", ex);
}
scheduledFuture = executorService.scheduleWithFixedDelay(this::ping, 1, 10, TimeUnit.MINUTES);
scheduledFuture = executorService.scheduleWithFixedDelay(RunnableExceptionLogger.wrap(this::ping), 1, 10, TimeUnit.MINUTES);
}
public void shutdown()
@@ -96,7 +97,8 @@ public class ClientSessionManager
}
catch (IOException ex)
{
log.warn(null, ex);
log.warn("unable to open session", ex);
return;
}
try