Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix uninitialized payload property #64

Closed
wants to merge 1 commit into from
Closed

fix uninitialized payload property #64

wants to merge 1 commit into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Feb 22, 2024

we use dispatch() for manual acking

i assume it's a proper client usage, since it fully handles response processing

i noticed for empty ack responses we get

In Client.php line 346:
                                                                                              
  [Error]                                                                                     
  Typed property Basis\Nats\Message\Msg::$payload must not be accessed before initialization  
                                                                                              

Exception trace:
  at /app/vendor/basis-company/nats/src/Client.php:346
 Basis\Nats\Client->onMessage() at /app/vendor/basis-company/nats/src/Client.php:325
 Basis\Nats\Client->process() at /app/vendor/basis-company/nats/src/Client.php:177
 Basis\Nats\Client->request() at /app/vendor/basis-company/nats/src/Client.php:129

this solves it

cc @nekufa :)

@ro0NL
Copy link
Contributor Author

ro0NL commented Feb 22, 2024

actually no, publish is sufficient for manual acking

@ro0NL ro0NL closed this Feb 22, 2024
@ro0NL ro0NL deleted the patch-1 branch February 22, 2024 15:33
@ro0NL ro0NL mentioned this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant