[GODRIVER-618] Connect succeeds even with MongoDb daemon not working Created: 02/Nov/18 Updated: 11/Sep/19 Resolved: 03/Dec/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | No Release |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Nikolaos Kostoulas | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I'm using the go library to connect to a database and Client connection succeeds even when mongod is down. Is this normal? |
| Comments |
| Comment by Nikolaos Kostoulas [ 05/Nov/18 ] |
|
oh okay! Thanks |
| Comment by Kristofer Brandow (Inactive) [ 05/Nov/18 ] |
|
Hi ngkostoulas, The Connect method does not ensure that a server exists before returning, it just starts the background goroutine. This behavior is similar to the behavior of database/sql. If you need to ensure that a MongoDB deployment has been connected to, please called Ping. --Kris |