[CSHARP-2337] Clearing connectionPools should close connections Created: 23/Jul/18 Updated: 27/Oct/23 Resolved: 29/Jan/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Vincent Kam (Inactive) | Assignee: | Vincent Kam (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
ExclusiveConnectionPool's Clear() appears to simply abandons all existing connections without closing them. If Clear becomes a blocking operation then we're going to need a ClearAsync version also. Closing the connections in the background is dangerous because it creates a possible race conditions where connections are opened faster than they are closed leading to resource exhaustion.
|