Fix indentation
The indentation seems off. I'm not sure if this is a general problem or just these two files.
private void on_connectivity_change() {
if (this.is_running && this.current_status.automatically_reconnect()) {
if (this.remote.connectivity.is_reachable.is_certain()) {
this.became_reachable_timer.start();
this.became_unreachable_timer.reset();
} else {
this.current_status = UNREACHABLE;
this.became_unreachable_timer.start();
this.became_reachable_timer.reset();
}
}
}
private void on_connectivity_error(Error error) {
if (this.is_running) {
this.became_reachable_timer.reset();
this.became_unreachable_timer.reset();
notify_connection_failed(new ErrorContext(error));
}
}
/**
* Starts checking if the manager's remote is reachable.
*
* This will cancel any existing check, and start a new one
* running, updating the `is_reachable` property on completion.
*/
public async void check_reachable() {
// We use a cancellable here as a guard instead of a boolean
// "is_checking" var since when a series of checks are
// requested in quick succession (as is the case when
// e.g. connecting or disconnecting from a network), the
// result of the *last* check is authoritative, not the first
// one.
cancel_check();
Cancellable cancellable = new Cancellable();
this.existing_check = cancellable;
string endpoint = this.remote.to_string();
bool is_reachable = false;
} catch (GLib.Error err) {
if (err is IOError.NETWORK_UNREACHABLE &&
this.monitor.network_available) {
// If we get a network unreachable error, but the monitor
// says there actually is a network available, we may be
// running in a Flatpak and hitting Bug 777706. If so,
// just assume the service is reachable is for now. :(
// Pull this put once xdg-desktop-portal 1.x is widely
// installed.
debug("Assuming %s is reachable, despite network unavailability",
endpoint);
is_reachable = true;
} else {
/**
* Cancels any running or future reachability check, if any.
*/
public void cancel_check() {
if (this.existing_check != null) {
this.existing_check.cancel();
this.existing_check = null;
}
this.delayed_check.reset();
}