Skip to content
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
13 changes: 4 additions & 9 deletions lib/features/postgresql/postgres_routine_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,13 @@ class _PostgresRoutineViewState extends material.State<PostgresRoutineView> {
}
_definitionControllers.clear();
_scrollController.dispose();
_disconnectCurrent(interruptIfBusy: true);
_disconnectCurrent();
super.dispose();
}

void _disconnectCurrent({bool interruptIfBusy = false}) {
if (interruptIfBusy && _loading) {
PostgresService.instance.interrupt(
widget.connectionRow,
database: widget.database,
mode: PgSessionMode.readOnly,
);
}
/// Releases the lease. The session is shared with the tree, the table tabs
/// and MCP, so closing this view never interrupts it.
void _disconnectCurrent() {
_lease?.release();
_lease = null;
}
Expand Down
13 changes: 4 additions & 9 deletions lib/features/postgresql/postgres_sequence_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,13 @@ class _PostgresSequenceViewState extends material.State<PostgresSequenceView> {
@override
void dispose() {
_scrollController.dispose();
_disconnectCurrent(interruptIfBusy: true);
_disconnectCurrent();
super.dispose();
}

void _disconnectCurrent({bool interruptIfBusy = false}) {
if (interruptIfBusy && _loading) {
PostgresService.instance.interrupt(
widget.connectionRow,
database: widget.database,
mode: PgSessionMode.readOnly,
);
}
/// Releases the lease. The session is shared with the tree, the table tabs
/// and MCP, so closing this view never interrupts it.
void _disconnectCurrent() {
_lease?.release();
_lease = null;
}
Expand Down
Loading