nats-io / stan.net

The official NATS .NET C# Streaming Client
Apache License 2.0
138 stars 41 forks source link

Fix close during reconnect #166

Closed ColinSullivan1 closed 4 years ago

ColinSullivan1 commented 4 years ago

If close was called while reconnecting, an exception could be thrown. This was breaking backward compatibility. Gracefully close the client if StanConnection.Close() is called while reconnecting.

Also remove the check for buffering in assigning NatsConn for backward compatibility as well.