Skip to content

Commit

Permalink
Don't remove state until after onCreationResponse is successful
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith committed Nov 8, 2023
1 parent 68b63b2 commit b674e05
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,12 @@ public void onNext(ExportedTableCreationResponse value) {
"Not expecting export creation responses for empty tickets");
}
final int exportId = ExportTicketHelper.ticketToExportId(value.getResultId().getTicket(), "export");
final State state = newStates.remove(exportId);
final State state = newStates.get(exportId);
if (state == null) {
throw new IllegalStateException("Unable to find state for creation response");
}
state.onCreationResponse(value);
newStates.remove(exportId, state);
}

@Override
Expand Down

0 comments on commit b674e05

Please sign in to comment.