We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2894c3d commit a8797a3Copy full SHA for a8797a3
src/MongoDB.Driver.Core/Core/Connections/BinaryConnection.cs
@@ -1,4 +1,4 @@
1
-/* Copyright 2013-2016 MongoDB Inc.
+/* Copyright 2013-2017 MongoDB Inc.
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
@@ -152,7 +152,7 @@ public ConnectionSettings Settings
152
// methods
153
private void ConnectionFailed(Exception exception)
154
{
155
- if (!_state.TryChange(State.Open, State.Failed))
+ if (!_state.TryChange(State.Open, State.Failed) && !_state.TryChange(State.Initializing, State.Failed))
156
157
var currentState = _state.Value;
158
if (currentState != State.Failed && currentState != State.Disposed)
0 commit comments