Add pause in pageserver stop method to avoid address already in use errors

This commit is contained in:
Konstantin Knizhnik
2021-05-20 17:40:02 +03:00
parent f38c2e620e
commit 87d7ce816d
2 changed files with 2 additions and 2 deletions

View File

@@ -130,11 +130,11 @@ impl PageServerNode {
// wait for pageserver stop
for _ in 0..5 {
let stream = TcpStream::connect(self.address());
thread::sleep(Duration::from_secs(1));
if let Err(_e) = stream {
return Ok(());
}
println!("Stopping pageserver on {}", self.address());
thread::sleep(Duration::from_secs(1));
}
bail!("Failed to stop pageserver with pid {}", pid);