Closed DavidVorick closed 6 years ago
I changed the number of tries to a try duration.
I kept it returning an error instead of panicking because in practice that error gets fed directly to a user, and I think it's more friendly to have an error like that than to panic on the user.
Ok, this code is now to my satisfaction.
I addressed all comments. I'll add the programming tasks after the PR is merged. Merged with the test fixes on master, this PR should be good to go.
Wasn't happy with the implementation.
I removed the unnecessary 1 second sleep, switched it so that there are no goroutines or channels needed, and I added some extra safety stuff like a timer for a potential infinite loop.
I also added a bunch of TODOs for things that aren't fully done correctly in the code yet.