fix for return exception
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user