-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Panic when network connection is lost #1940
Comments
It's likely due to any one of these methods being called immediately after a disconnect: https://github.com/launchbadge/sqlx/blob/main/sqlx-core/src/postgres/listener.rs#L95-L145 An easy fix would look like this:
|
Oh, and this should probably be fixed in the
use futures_util::TryFutureExt;
Box::pin(async move {
self.reconnect_if_needed().await?;
Ok(self.connection().fetch_many(query))
}.try_flatten_stream()) |
While network maintenance was being performed the following error popped-up:
Unfortunately I was unable to reproduce this issue in a lab environment. Looking at the code however, I would imagine the culprit is:
sqlx/sqlx-core/src/postgres/listener.rs
Line 260 in bd40cc9
The text was updated successfully, but these errors were encountered: