Skip to content

Replace for loops with forEach in RSocketClient/Server to fix non-deterministic behavior#556

Merged
robertroeser merged 1 commit into
rsocket:1.0.xfrom
rdegnan:1.0.x
Dec 12, 2018
Merged

Replace for loops with forEach in RSocketClient/Server to fix non-deterministic behavior#556
robertroeser merged 1 commit into
rsocket:1.0.xfrom
rdegnan:1.0.x

Conversation

@rdegnan

@rdegnan rdegnan commented Dec 11, 2018

Copy link
Copy Markdown
Member

I encountered a null pointer exception inside RSocketClient::cleanUpSubscriber because subscriber was null. The only way this could happen is if the receivers map is modified while it is being iterated over. The solution is to use the forEach method instead of iterator, which is properly synchronized.

…erministic behavior

Signed-off-by: Ryland Degnan <ryland@netifi.com>
@robertroeser robertroeser merged commit 2be7d6c into rsocket:1.0.x Dec 12, 2018
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.

2 participants