From df8e70f79822e3887b4f21ca718af8a53bbda2c4 Mon Sep 17 00:00:00 2001 From: BCCSTeam Date: Tue, 2 Jan 2024 17:43:10 +0100 Subject: [PATCH] fix: return the first response when broadcasting to a single socket (#4878) --- lib/broadcast-operator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/broadcast-operator.ts b/lib/broadcast-operator.ts index 255f52ded7..48e295cb78 100644 --- a/lib/broadcast-operator.ts +++ b/lib/broadcast-operator.ts @@ -254,7 +254,7 @@ export class BroadcastOperator clearTimeout(timer); ack.apply(this, [ null, - this.flags.expectSingleResponse ? null : responses, + this.flags.expectSingleResponse ? responses[0] : responses, ]); } };