Skip to content

Comments

fix: remove extraneous log output wrt stopping icx-proxy#1839

Merged
mergify[bot] merged 2 commits intomasterfrom
ericswanson/refine-icx-proxy-stopping
Sep 28, 2021
Merged

fix: remove extraneous log output wrt stopping icx-proxy#1839
mergify[bot] merged 2 commits intomasterfrom
ericswanson/refine-icx-proxy-stopping

Conversation

@ghost
Copy link

@ghost ghost commented Sep 27, 2021

When dfx starts, it logs "Stopping icx-proxy..." "Stopped" when it didn't actually do that.

When dfx starts, it logs "Stopping icx-proxy..." "Stopped" when it didn't actually do that.
@jwiegley
Copy link
Contributor

jwiegley commented Sep 28, 2021

Would this perhaps be any clearer?

    fn stop_icx_proxy(&mut self) {
        if let Some(sender) = self.stop_sender.take() {
            info!(self.logger, "Stopping icx-proxy...");
            sender.send(()).unwrap();
            info!(self.logger, "Stopped.");
        } else if let Some(join) = self.thread_join.take() {
            info!(self.logger, "Stopping icx-proxy...");
            join.join().unwrap();
            info!(self.logger, "Stopped.");
        }
    }

@ghost
Copy link
Author

ghost commented Sep 28, 2021

No, the normal case is that both are Some, and the stop sequence is:

  1. signal the handler thread to stop (sender.send())
  2. wait for handler thread to exit (join.join())

@ghost ghost added the automerge-squash label Sep 28, 2021
@mergify mergify bot merged commit 91bb7a3 into master Sep 28, 2021
@mergify mergify bot deleted the ericswanson/refine-icx-proxy-stopping branch September 28, 2021 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants