Skip to content

Commit

Permalink
Merge pull request #48 from pozil/pozil/fix-request-additional-events
Browse files Browse the repository at this point in the history
fix: request additional events
  • Loading branch information
pozil authored Nov 15, 2024
2 parents 4bb6b36 + 53ffc18 commit d1af726
Show file tree
Hide file tree
Showing 10 changed files with 983 additions and 394 deletions.
5 changes: 4 additions & 1 deletion dist/client.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ var PubSubApiClient = class {
this.#logger.error(parseError);
}
if (subscription.info.receivedEventCount === subscription.info.requestedEventCount) {
this.#logger.debug(
`${topicName} - Reached last of ${subscription.info.requestedEventCount} requested event on channel.`
);
if (isInfiniteEventRequest) {
this.requestAdditionalEvents(
subscription.info.topicName,
Expand Down Expand Up @@ -889,7 +892,7 @@ var PubSubApiClient = class {
}
subscription.receivedEventCount = 0;
subscription.requestedEventCount = numRequested;
subscription.write({
subscription.grpcSubscription.write({
topicName,
numRequested
});
Expand Down
2 changes: 1 addition & 1 deletion dist/client.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ var PubSubApiClient = class {
this.#logger.error(parseError);
}
if (subscription.info.receivedEventCount === subscription.info.requestedEventCount) {
this.#logger.debug(
`${topicName} - Reached last of ${subscription.info.requestedEventCount} requested event on channel.`
);
if (isInfiniteEventRequest) {
this.requestAdditionalEvents(
subscription.info.topicName,
Expand Down Expand Up @@ -856,7 +859,7 @@ var PubSubApiClient = class {
}
subscription.receivedEventCount = 0;
subscription.requestedEventCount = numRequested;
subscription.write({
subscription.grpcSubscription.write({
topicName,
numRequested
});
Expand Down
Loading

0 comments on commit d1af726

Please sign in to comment.