nats-io / nats.rs

Rust client for NATS, the cloud native messaging system.
Apache License 2.0
980 stars 159 forks source link

Remove server version validation #1273

Closed Jarema closed 1 month ago

Jarema commented 1 month ago

If client was created with retry_on_initial_connect and create_consumer_on_stream was called immediately afterwards, it could cause a panic, as semver regex capture would fail on empty string.

This PR removes the validation, as it was never a reliable way to check server version, as the meta leader can be a different version than the server that the client is connected to. It also protects the server check method against empty semver string.

fixes #1271

Signed-off-by: Tomasz Pietrek tomasz@nats.io