Fix System.UriFormatException on muliple server in NatsURL #125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the following exception if NatUrl contains multiple server
e.g.
var opts = StanOptions.GetDefaultOptions();
opts.NatsURL = "nats://127.0.0.1:4222,nats://127.0.0.1:4222";
Exception
STAN.Client.StanConnectionException : Invalid connection.
[09/05/2019 19:22:36 Informational] [xUnit.net 00:00:02.0486549] ---- System.UriFormatException : Invalid URI: Invalid port specified.
[09/05/2019 19:22:36 Informational] [xUnit.net 00:00:02.0497734] Stack Trace:
[09/05/2019 19:22:36 Informational] [xUnit.net 00:00:02.0509682] C:\dev\csharp-nats-streaming\STAN.CLIENT\StanConnection.cs(200,0): at STAN.Client.Connection..ctor(String stanClusterID, String clientID, StanOptions options)
[09/05/2019 19:22:36 Informational] [xUnit.net 00:00:02.0513004] C:\dev\csharp-nats-streaming\STAN.CLIENT\StanConnectionFactory.cs(32,0): at STAN.Client.StanConnectionFactory.CreateConnection(String clusterID, String clientID, StanOptions options)