Skip to content

Commit

Permalink
Fix "Head of empty stream" error in EnforcementFlow.
Browse files Browse the repository at this point in the history
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
  • Loading branch information
yufei-cai committed Mar 17, 2022
1 parent f6f26a3 commit f8a21c5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ public <T> SubSource<AbstractWriteModel, T> create(
searchUpdateObserver.process(changedMetadata, thing);
return computeWriteModel(changedMetadata, thing);
})
.runWith(Sink.head(), system);
});
.runWith(Sink.seq(), system);
})
.mapConcat(writeModels -> writeModels);
}

private Source<Pair<ThingId, JsonObject>, NotUsed> retrieveThingFromCachingFacade(final ThingId thingId,
Expand Down

0 comments on commit f8a21c5

Please sign in to comment.