Skip to content

FailoverClientConnectionFactory.FailoverTcpConnection.findAConnection() can get caught in infinite loop #3526

@squawk979

Description

@squawk979

say we have 2 connection factories s1 and s2, initially we connect ok to s1

however a subsequent send results in an error on s1 (eg disconnection), findAConnection is called to establish a new connection

1/ we have lastFactoryToTry = s1, we enter the loop and try nextfactory = s2 but connection to this fails and throws exception. in the exception handling lastFactoryToTry does not equal nextfactory so we reset iterator and loop round.

2/ nextfactory now =s1 connection fails and throws exception. in the exception handling !this.factoryIterator.hasNext() is not true so we loop round. back to 1/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions