fix for return exception

This commit is contained in:
Ben Menking committed 2026-06-23 17:40:28 -04:00
1 parent 21e075a054
commit b8154d8b97
1 file changed
+1 -1
+1 -1
View File
@@ -140,7 +140,7 @@ class Meshcore {
* @param bool $async
* @return null|MessageResponse
*/
public function getNextMessage(bool $async = false): ?MessageResponse {
public function getNextMessage(bool $async = false): MessageResponse | NoMoreMessagesResponse {
CoreProtocol::writeFrame($this->serial, chr(CoreProtocol::CMD_SYNC_NEXT_MESSAGE));
return $this->waitForResponse([MessageResponse::class, NoMoreMessagesResponse::class], $async);