From b1a31e87f0aadeb5894939ded01f60f1259657c5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 2 Mar 2024 01:02:00 +0000 Subject: [PATCH] It took me 2 hours to find this bug ............ --- src/generic/SendReliabilityLayer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/SendReliabilityLayer.php b/src/generic/SendReliabilityLayer.php index 5234655..9fcf6c5 100644 --- a/src/generic/SendReliabilityLayer.php +++ b/src/generic/SendReliabilityLayer.php @@ -207,9 +207,9 @@ private function updateReliableWindow() : void{ isset($this->reliableWindow[$this->reliableWindowStart]) && //this messageIndex has been used $this->reliableWindow[$this->reliableWindowStart] === true //we received an ack for this messageIndex ){ + unset($this->reliableWindow[$this->reliableWindowStart]); $this->reliableWindowStart++; $this->reliableWindowEnd++; - unset($this->reliableWindow[$this->reliableWindowStart]); } }