Skip to content
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

Implement correct stopping of windows service #2

Open
SpeedSX opened this issue Jun 29, 2020 · 1 comment
Open

Implement correct stopping of windows service #2

SpeedSX opened this issue Jun 29, 2020 · 1 comment

Comments

@SpeedSX
Copy link
Owner

SpeedSX commented Jun 29, 2020

The problem is that we miss polling code:

    // Poll shutdown event.
    match shutdown_rx.recv_timeout(Duration::from_secs(1)) {
        // Break the loop either upon stop or channel disconnect
        Ok(_) | Err(mpsc::RecvTimeoutError::Disconnected) => break,

        // Continue work if no events were received within the timeout
        Err(mpsc::RecvTimeoutError::Timeout) => (),
    };      

I can't understand where it should be. Process can be stopped only by killing task (taskkill /F /IM consum-api.exe)

@SpeedSX
Copy link
Owner Author

SpeedSX commented Jul 6, 2020

The code is not what we need. The idea implemented in commit 67c9cc1 is to pass signal receiver to warp, and send it from service event handler. And that works, but sometimes gives an error, and another stopping retry or two is needed to stop. Not sure what happens in that case, probably some panic? Not sure how can we log that though...

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

No branches or pull requests

1 participant