Skip to content

Commit 9e58267

Browse files
authored
Merge pull request #140 from Dstack-TEE/tappd-health
tappd: Don't reuse connections in healthy check client
2 parents 8d01ce2 + fb0688b commit 9e58267

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tappd/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,12 @@ async fn run_watchdog(port: u16) {
121121
info!("Watchdog enabled, interval={watchdog_usec}us, heartbeat={heatbeat_interval:?}",);
122122
let mut interval = tokio::time::interval(heatbeat_interval);
123123

124-
// Create HTTP client for health checks
125-
let client = reqwest::Client::new();
126-
127124
let probe_url = format!("http://localhost:{port}/prpc/Worker.Version");
128125
loop {
129126
interval.tick().await;
130127

128+
// Create HTTP client for health checks
129+
let client = reqwest::Client::new();
131130
// Perform health check
132131
match client.get(&probe_url).send().await {
133132
Ok(response) if response.status().is_success() => {

0 commit comments

Comments
 (0)