Skip to content

Commit

Permalink
Fix tracking expected acks per client
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <[email protected]>
  • Loading branch information
nguyer committed Feb 26, 2024
1 parent 0b76326 commit 2aef64d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/eventstream-proxy/eventstream-proxy.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export abstract class EventStreamProxyBase extends WebSocketEventsBase {

handleConnection(client: WebSocketEx) {
super.handleConnection(client);

if (!this.awaitingAck.get(client.id)) {
this.awaitingAck.set(client.id, []);
}

client.on('message', async (message: string) => {
const action = JSON.parse(message) as WebSocketActionBase;
switch (action.type) {
Expand Down

0 comments on commit 2aef64d

Please sign in to comment.