session manager: open session on executor thread
This avoids blocking the main thread on startup during the http call
This commit is contained in:
@@ -61,6 +61,8 @@ public class ClientSessionManager
|
||||
}
|
||||
|
||||
public void start()
|
||||
{
|
||||
executorService.execute(() ->
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -71,6 +73,7 @@ public class ClientSessionManager
|
||||
{
|
||||
log.warn("error opening session", ex);
|
||||
}
|
||||
});
|
||||
|
||||
scheduledFuture = executorService.scheduleWithFixedDelay(RunnableExceptionLogger.wrap(this::ping), 1, 10, TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user