rsocket / rsocket-kotlin

RSocket Kotlin multi-platform implementation
http://rsocket.io
Apache License 2.0
553 stars 37 forks source link

fix IntMap.rehash #159

Closed mihanvr closed 3 years ago

mihanvr commented 3 years ago

fix incorrect IntMap rehash

Motivation:

With intensive parallel calls requestResponse and requestStream with different lifetimes, responses or flow values were sometimes "lost". Debugging showed that RSocketState.receivers[streamId] sometimes returned null, even though the desired streamId existed.

Modifications:

See diff

Result:

The problem is no longer repeated

whyoleg commented 3 years ago

Thx for finding and fixing an issue!