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

Await both the heartbeat request and shutdown channel in the heartbeat task #3254

Closed
Tracked by #3322
teor2345 opened this issue Dec 17, 2021 · 1 comment · Fixed by #3325
Closed
Tracked by #3322

Await both the heartbeat request and shutdown channel in the heartbeat task #3254

teor2345 opened this issue Dec 17, 2021 · 1 comment · Fixed by #3325
Assignees
Labels
A-network Area: Network protocol updates or fixes C-enhancement Category: This is an improvement C-security Category: Security issues I-hang A Zebra component stops responding to requests I-slow Problems with performance or responsiveness

Comments

@teor2345
Copy link
Contributor

teor2345 commented Dec 17, 2021

Motivation

We don't detect cancellations when we're waiting for a response from a peer, so this could cause hangs.

// We've reached another heartbeat interval without
// shutting down, so do a heartbeat request.
//
// TODO: await heartbeat and shutdown. The select
// function needs pinned types, but pinned generics
// are hard (#1678)
let heartbeat = send_one_heartbeat(&mut server_tx);
if heartbeat_timeout(
heartbeat,
&mut heartbeat_ts_collector,
&connected_addr,
&remote_services,
)
.await

Specifications

Designs

Related Work

@teor2345 teor2345 added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Medium C-security Category: Security issues I-hang A Zebra component stops responding to requests I-slow Problems with performance or responsiveness A-network Area: Network protocol updates or fixes labels Dec 17, 2021
@teor2345 teor2345 self-assigned this Jan 6, 2022
@mpguerra
Copy link
Contributor

@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-enhancement Category: This is an improvement C-security Category: Security issues I-hang A Zebra component stops responding to requests I-slow Problems with performance or responsiveness
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants