Skip to content

Commit

Permalink
fix: 馃悰 insert response into correct position into the buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jan 16, 2024
1 parent 18f80f4 commit f47e757
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/standalone/StandaloneClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ export class StandaloneClient {
public async call(call: StandaloneCall): Promise<unknown> {
const noResponse = call.noRes;
if (call.asap) {
const responseIndex = this.responses.length - this.requests.length;
this.requests.unshift(call);
this.responses.unshift(noResponse ? null : call);
this.responses.splice(responseIndex, 0, noResponse ? null : call);
} else {
if (!this._isReady) await this.whenReady;
this.requests.push(call);
Expand Down

0 comments on commit f47e757

Please sign in to comment.