NebulousLabs / Sia-GPU-Miner

A GPU Miner for Sia
MIT License
151 stars 79 forks source link

Don't exit on network failure #28

Closed DavidVorick closed 9 years ago

DavidVorick commented 9 years ago

there are going to be curl calls that fail for no reason on occasion, but that doesn't mean you need to exit the program. This probably shouldn't have made it past code review.

If any of the network calls fail, you should print a warning or some sort of statement about the failed call, and then sleep for a second and resume normal mining. Let the user decide to kill the program. I think all of the 'exit' calls in network.c should be replaced/removed, and there are probably a handful of exit calls in 'sia-gpu-miner.c' that should also be replaced/removed.

You should only call exit if the program is naturally terminating, or if there's something catastrophic preventing you from continuing (opencl failing to compile is a good example. Being unable to reach 'siad' is not a good example).