Skip to content

Commit

Permalink
Improve check for if postgres session is still open (#2928)
Browse files Browse the repository at this point in the history
  • Loading branch information
jogboms authored Mar 22, 2024
1 parent 044a0f3 commit ae40dd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extras/drift_postgres/lib/src/pg_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class _PgDelegate extends DatabaseDelegate {
late DbVersionDelegate versionDelegate;

@override
Future<bool> get isOpen => Future.value(_openedSession != null);
Future<bool> get isOpen =>
Future.value(_openedSession != null && _openedSession!.isOpen);

@override
Future<void> open(QueryExecutorUser user) async {
Expand Down

0 comments on commit ae40dd6

Please sign in to comment.