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.
If client was created with
retry_on_initial_connect
andcreate_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