Don't error on health check

This commit is contained in:
Bojan Serafimov
2022-01-18 15:15:38 -05:00
parent dab30c27b6
commit 1e717b5414

View File

@@ -168,7 +168,7 @@ impl ProxyConnection {
loop {
let msg = match self.pgb.read_message()? {
Some(Fe::StartupPacket(msg)) => msg,
None => bail!("connection is lost"),
None => return Ok(None), // Probably load balancer health check
bad => bail!("unexpected message type: {:?}", bad),
};
println!("got message: {:?}", msg);