Closed pianohacker closed 7 years ago
if ensync noticed the dropped connection
To make sure we're on the same page here, it does exit with a fatal error currently, right?
It would also be nice if, on top of that, it remembered the key so the passphrase wasn't required on reconnect
If it didn't also do this, wouldn't the "automatic reconnect" feature be functionally equivalent to just running ensync
inside a while true
shell loop / under supervisord
?
I do agree this'd be useful though. I had originally decided against it because I didn't think anyone would run ensync in a daemon-like way in conjunction with an interactive means of getting the passphrase, in which case the shell loop / supervisor would have been sufficient.
Ah, yes. To clarify; it does notice the dropped connection, but only when it next tries to send a packet, which could be quite awhile after the computer comes back up. Perhaps some kind of heartbeat?
If it didn't also do this, wouldn't the "automatic reconnect" feature be functionally equivalent to just running ensync inside a while true shell loop / under supervisord?
Yup, true. Remembering the passphrase would be the only reason to do this.
Version 0.2.3 fixes the issue where --wait
wouldn't notice the connection loss until the next time something woke it up locally. I'll probably get to the other half of this later this week.
Sorry for the exceptionally large value of "week", but this is now in 0.2.4.
A quick test shows this working; thanks!
When running
ensync sync --watch
on a laptop going in and out of suspend, it would be nice if ensync noticed the dropped connection and automatically reconnected.It would also be nice if, on top of that, it remembered the key so the passphrase wasn't required on reconnect, but that may be a separate issue.