Skip to content

TcpOutboundGateway. Semaphore not released after exception #3993

@opardor

Description

@opardor

Hello, I have found next behaviour which could be an issue.

I'm working around with the HelloWorldInterceptor example, a TcpOutboundGateway in async mode and a ConnectionFactory with singleUse=false field.

In this test the Server is who should start the handshake conversation.
Once the client tries to send a message it waits for hello" message from the server, if the await time expires it throws a MessagingException (negotiation error); then the exception is catched by TcpOutboundGateway, and cleanup method in finally block is not invoked so semaphore is not released and next invocations to handleMessage are locked (until request timeout passed) when acquiring the semaphore.

Attached proofOfConcept and test execution log.

Git proofOfConcept
test.log

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions