rabbitmq / rabbitmq-stream-go-client

A client library for RabbitMQ streams
MIT License
170 stars 20 forks source link

pkg/client/stream: fix deadlock for client methods #274

Closed HustonMmmavr closed 8 months ago

HustonMmmavr commented 8 months ago

Client.queryOffset/queryPublisherSequence/StreamStats were fixed to prevent deadlock in case of request timeout (for example rabbit server is down). Now these methods returns error immidiately if it occured and doesn't try to read from data chanel, because in case of request timeout it hangs (no other gorouitine would write to this channel).

Also Client is extended with additional field socketCallTimeout, for testing purposes (decrease running time of new tests).

Closes #273

Gsantomaggio commented 8 months ago

@HustonMmmavr Thank you for the PR At the moment we are busy with other tasks. We will have a look as soon as possible. Please have a bit of patience :)

Gsantomaggio commented 8 months ago

@HustonMmmavr I am testing the PR and it seems to be ok. I will resolve the conflicts and I will merge

Gsantomaggio commented 8 months ago

Thank you

HustonMmmavr commented 8 months ago

Thanks)