rsocket-dart
rsocket-dart copied to clipboard
fix: adjust payload keep alive values to be in ms
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
Msto 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.