Skip to content

Commit

Permalink
Do not queue when using bidirectional push
Browse files Browse the repository at this point in the history
  • Loading branch information
caalador committed Jan 10, 2025
1 parent 7a97b9a commit f7ff95f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,6 @@ private void sendPayload(final JsonObject payload) {
payload.put(ApplicationConstants.CLIENT_TO_SERVER_ID,
clientToServerMessageId++);

if (!registry.getRequestResponseTracker().hasActiveRequest()) {
// Direct calls to send from outside probably have not started
// request.
registry.getRequestResponseTracker().startRequest();
}

if (push != null && push.isBidirectional()) {
// When using bidirectional transport, the payload is not resent
// to the server during reconnection attempts.
Expand All @@ -248,6 +242,12 @@ private void sendPayload(final JsonObject payload) {
pushPendingMessage = payload;
push.push(payload);
} else {
if (!registry.getRequestResponseTracker().hasActiveRequest()) {
// Direct calls to send from outside probably have not started
// request.
registry.getRequestResponseTracker().startRequest();
}

Console.debug("send XHR");
registry.getXhrConnection().send(payload);

Expand Down

0 comments on commit f7ff95f

Please sign in to comment.