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

Cancelling a call to PgListener::recv() will result in a protocol error #1097

Closed
Diggsey opened this issue Mar 13, 2021 · 1 comment · Fixed by #1099
Closed

Cancelling a call to PgListener::recv() will result in a protocol error #1097

Diggsey opened this issue Mar 13, 2021 · 1 comment · Fixed by #1099

Comments

@Diggsey
Copy link
Contributor

Diggsey commented Mar 13, 2021

Error: encountered unexpected or invalid data: unknown message type: '\u{0}'

This will occur if you try to call recv() with a timeout.

@Diggsey
Copy link
Contributor Author

Diggsey commented Mar 13, 2021

This appears to be caused by the SQLX BufStream implementation, which extends the internal buffer even if the read operation is later cancelled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant