Skip to content

Commit 12a2264

Browse files
author
Benjamín Martínez Mateos
committed
Clear previous message queued
1 parent a3d7f28 commit 12a2264

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Clients/MGP25.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ private function processAllMessages()
183183

184184
$this->broadcast = false;
185185

186+
$this->manager->clear();
187+
186188
return $processed;
187189
}
188190

@@ -234,7 +236,7 @@ private function sendMessage($receiver, $message)
234236
break;
235237
}
236238

237-
$this->gateway()->pollMessage();
239+
while ($this->gateway()->pollMessage());
238240

239241
return $id;
240242
}

0 commit comments

Comments
 (0)