right after returning from the handleWriteWithResponsequeryOffset starts accepting the offset value on the channel here is a code on the next line.
Thus there may occur a deadlock, when the response was finished by timeout (for example rabbit service unavailable), but the Client.queryOffset method still waiting the data on channel which wouldn't be closed. Seems that error check should be added before reading from channel, like it's done at Client.open.
I suppose that next methods also may have a deadlock: Client.StreamStats and Client.queryPublisherSequence
Describe the bug
Hello! I met the scenario when call to the Environment.QueryOffset may hang:
Here is a description:
Environment.QueryOffset
callsClient.queryOffset
which internally:Client.handleWriteWithResponse
withremoveResponse
argument passed as false (so RemoveResponseById won't be called and closing of response.data channel wouldn't be performed). The last function callswaitCodeWithDefaultTimeOut
handleWriteWithResponse
queryOffset
starts accepting the offset value on the channel here is a code on the next line.Thus there may occur a deadlock, when the response was finished by timeout (for example rabbit service unavailable), but the
Client.queryOffset
method still waiting the data on channel which wouldn't be closed. Seems that error check should be added before reading from channel, like it's done atClient.open
. I suppose that next methods also may have a deadlock:Client.StreamStats
andClient.queryPublisherSequence
Reproduction steps
Expected behavior
No hang
Additional context
No response