-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore: Detect client disconnect in pg proxy #2256
Conversation
- Lowers log level for unexpected eof errors (client disconnects). - Raises log level for all other errors
can we mark this as closing the issue #2255 ? |
done |
crates/glaredb/src/pg_proxy.rs
Outdated
@@ -85,7 +87,9 @@ impl PgProxy { | |||
debug!("client connected (proxy)"); | |||
match handler.proxy_connection(inbound).await { | |||
Ok(_) => debug!("client disconnected"), | |||
Err(e) => debug!(%e, "client disconnected with error."), | |||
Err(PgSrvError::Io(e)) if e.kind() == io::ErrorKind::UnexpectedEof => | |||
trace!("client disconnected"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the Ok()
case also be a trace then? should we distinguish between the two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downgraded debugs to trace, and used different messages in both cases (in case we need to distinguish).
Closes #2255