Skip to content

Commit

Permalink
Issue #6556 Also use FuturePromise<Void>
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bartel <janb@webtide.com>
  • Loading branch information
janbartel committed Jul 29, 2021
1 parent d438a1b commit 627a34a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -188,13 +188,13 @@ public void store(String id, SessionData data) throws Exception
if (!isStarted())
throw new IllegalStateException("Not started");

final FuturePromise<Boolean> result = new FuturePromise<>();
final FuturePromise<Void> result = new FuturePromise<>();
Runnable r = () ->
{
try
{
_client.set(id, _expirySec, data);
result.succeeded(Boolean.TRUE);
result.succeeded(null);
}
catch (Exception e)
{
Expand Down
Expand Up @@ -182,15 +182,15 @@ public void store(String id, SessionData data) throws Exception
//set the last saved time to now
data.setLastSaved(System.currentTimeMillis());

final FuturePromise<Boolean> result = new FuturePromise<>();
final FuturePromise<Void> result = new FuturePromise<>();
Runnable r = () ->
{
try
{
//call the specific store method, passing in previous save time
doStore(id, data, lastSave);
data.clean(); //unset all dirty flags
result.succeeded(Boolean.TRUE);
result.succeeded(null);
}
catch (Exception e)
{
Expand Down

0 comments on commit 627a34a

Please sign in to comment.