session manager: open session on executor thread

This avoids blocking the main thread on startup during the http call
This commit is contained in:
Adam
2022-04-08 10:58:13 -04:00
parent dc009bd7af
commit f54b7ffc44

View File

@@ -61,6 +61,8 @@ public class ClientSessionManager
} }
public void start() public void start()
{
executorService.execute(() ->
{ {
try try
{ {
@@ -71,6 +73,7 @@ public class ClientSessionManager
{ {
log.warn("error opening session", ex); log.warn("error opening session", ex);
} }
});
scheduledFuture = executorService.scheduleWithFixedDelay(RunnableExceptionLogger.wrap(this::ping), 1, 10, TimeUnit.MINUTES); scheduledFuture = executorService.scheduleWithFixedDelay(RunnableExceptionLogger.wrap(this::ping), 1, 10, TimeUnit.MINUTES);
} }