-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builder shouldn't quit on connection loss #3
Comments
what retry logic should it have? |
I think the client already implements exponential backoff when it cannot connect to the server. Perhaps the same could also work here too. |
Just waiting until it can connect again and behaving as if it was started fresh (so send any lagging data or whatever) should be enough. |
@Fuuzetsu are you still experiencing this? If not I can close this issue. If so, how does this appear in logs when it disconnects? My builders generally survive network outages. I'm running them on a repurposed PC on a home network so there's nothing special shielding them from issues. It's possible that SMF (service management framework) is restarting the service.. This code in client.hs already does indefinate connection retries with 5 second sleeps between attempts: `onConnectionDropped`
do verbose' v user ("Connection dropped...sleeping for 5 seconds...")
threadDelay (5 * 1000000)
connLoop curDir baseDir user host SOURCE: Lines 86 to 89 in 1f47fcf
c host `onConnectionFailed`
do verbose' v user ("Failed...sleeping for " ++ show secs ++ " seconds...")
threadDelay (secs * 1000000)
conn user host ((secs * 2) `min` 600) SOURCE: Lines 93 to 96 in 1f47fcf
|
@AlainODea I haven't used this in years so I don't know, sorry. |
@Fuuzetsu no worries at all. |
Currently builder terminates if it loses connection which means that we have to check every now and again and manually restart it. It'd be nice if it just waited for a connection to come back and resume its regular duties.
The text was updated successfully, but these errors were encountered: