rsocket-dart icon indicating copy to clipboard operation
rsocket-dart copied to clipboard

fix: adjust payload keep alive values to be in ms

Open petragabriela opened this issue 3 years ago • 0 comments

Changing the keep alive interval and keep alive max lifetime values to be in milliseconds according to the documented protocol.

Motivation:

Currently, the master branch is not really usable because the setup payload sent to a server includes a max lifetime value in seconds while it should be in milliseconds according to the protocol. As a result, the channel will be prematurely closed before the client can receive the response.

Modifications:

  • Added Ms to instances variables related to the keep-alive for better clarity
  • Changed their default values to be in milliseconds
  • Changed the keep-alive timer param to be in milliseconds
  • Minor fix in WebSocketRSocketResponder: add casting

Result:

No breaking change is expected, the keepAlive setter of the RSocketConnector class still receives the params in seconds unit. Now RSocket channels should not be prematurely closed.

References:

Protocol Doc Kotlin SDK Go SDK

petragabriela avatar Dec 10 '22 13:12 petragabriela