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

Don't ignore close in the pool when using force #406

Merged
merged 2 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.4.8

- Fix: Don't ignore de pool resource `close` call when using foce. [#406](https://github.com/isoos/postgresql-dart/pull/406) by [davidmartos96](https://github.com/davidmartos96).

## 3.4.7

- Implemented `Pool.close(force: true)` (using [davidmartos96](https://github.com/davidmartos96)'s [#397](https://github.com/isoos/postgresql-dart/pull/397) as baseline).
Expand Down
6 changes: 4 additions & 2 deletions lib/src/pool/pool_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,12 @@ class _PoolConnection implements Connection {

@override
Future<void> close({bool force = false}) async {
// Don't forward the close call, the underlying connection should be re-used
// Don't forward the close call unless forcing. The underlying connection should be re-used
// when another pool connection is requested.

// TODO: Implement force close.
if (force) {
await _connection.close(force: force);
}
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: postgres
description: PostgreSQL database driver. Supports statement reuse and binary protocol and connection pooling.
version: 3.4.7
version: 3.4.8
homepage: https://github.com/isoos/postgresql-dart
topics:
- sql
Expand Down
Loading