[GODRIVER-207] Ensure top level context.Context is used when making network calls. Created: 24/Jan/18 Updated: 05/Feb/18 Resolved: 05/Feb/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.0.1 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | GODRIVER Core Specs |
| Description |
|
All the Collection level methods have context.Context as their first parameter which allows setting a deadline for the operation to occur within. In the private/ops package the runMustUsePrimary and the runMayUseSecondary functions spawn a new goroutine and give it a context.Background which is used when setting the deadline on the TCP connection. The context.Context provided by the user should be used to set the deadline on the TCP connection, update the implementation to do this. |
| Comments |
| Comment by Kristofer Brandow (Inactive) [ 05/Feb/18 ] |
|
Code Review: https://review.gerrithub.io/c/395179/ |