Skip to content

Conversation

@garyrussell
Copy link
Contributor

Resolves #3713

#3326 added support
for multiple TcpSenders. However, when connections are intercepted, the sender
list was not properly chained through the interceptors.

  • override registerSenders and properly capture the real senders in the last
    interceptor and intermediate interceptors
  • this ensures that addNewConnection is called on each interceptor
  • when removing dead connections, use the (possibly intercepted) connection sender
    list insted of the factory's raw sender list.

cherry-pick to 5.5.x

@garyrussell
Copy link
Contributor Author

Incomplete.

@garyrussell garyrussell closed this Feb 1, 2022
Resolves spring-projects#3713

spring-projects#3326 added support
for multiple `TcpSenders`. However, when connections are intercepted, the sender
list was not properly chained through the interceptors.

- override `registerSenders` and properly capture the real senders in the last
  interceptor and intermediate interceptors
- this ensures that `addNewConnection` is called on each interceptor
- when removing dead connections, use the connection sender list insted of the
  factory's raw sender list; detect if the connection is an interceptor and
  call its remove method instead.

**cherry-pick to 5.5.x**
@garyrussell garyrussell reopened this Feb 2, 2022
@artembilan artembilan merged commit a493c9c into spring-projects:main Feb 2, 2022
@artembilan
Copy link
Member

... and cherry-picked to 5.5.x

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.

TcpConnectionInterceptorSupport.addNewConnection() is no longer called

2 participants