[JAVA-649] Connection timeout is ignored in ConnectionStatus Created: 21/Sep/12 Updated: 26/Nov/12 Resolved: 16/Nov/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Configuration |
| Affects Version/s: | 2.9.1 |
| Fix Version/s: | 2.10.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lukas Krecan | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Default connection timeout is used in ConnectionStatus class causing the following code stopping after 20s instead of 1s.
|
| Comments |
| Comment by auto [ 15/Nov/12 ] | |||||||||||||||||
|
Author: {u'date': u'2012-11-14T19:25:29Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: | |||||||||||||||||
| Comment by Jafar Aliyev [ 05/Nov/12 ] | |||||||||||||||||
|
I can offer the following workaround.
But in this case you have to run MongoDB server with -auth option: | |||||||||||||||||
| Comment by Jeffrey Yemin [ 21/Sep/12 ] | |||||||||||||||||
|
The way to fix this is for com.mongodb.ConnectionStatus#ensureMaster to take a timeout as an argument. | |||||||||||||||||
| Comment by Lukas Krecan [ 21/Sep/12 ] | |||||||||||||||||
|
I have forgotten to mention that it happens only if the server is not accessible. |