Merge pull request #6533 from RosettaCommons/roccmoretti/server_unavailable
[Foldit] Add timeout for server communication
We're running into a situation where the Foldit server is nominally "up" (so you don't get a full out connection error), but is taking forever to respond. The curl library has a timeout option, so we can recognize we're not getting a response back in a reasonable amount of time, and then raise an error appropriately.
I double checked, and it looks like everything communicating with the server should be properly wrapped to catch the exception -- whether it behaves reasonably when the server connection goes away is another question.
I tested it with the local server, and things seem to work decently when the connection goes away. (It also works with the login on the main server -- we wait for 5 seconds and then report the appropriate connection error.)