You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mysql): forceClose during connect leaks the SSH tunnel handle, and the interrupted session is revived #1313
MysqlConnection.forceClose (lib/core/database/mysql_connection.dart:404) returns early with if (c == null) return;, before the SSH handle is released. When it runs while connect() is in flight (tunnel opened, _conn not yet assigned), the handle is never released and the tunnel session keeps a reference forever.
Also, _connectOnce sets _isConnected = true when it completes, so a connection that was interrupted in that window comes back as connected. PostgresConnection.forceClose releases the handle regardless.
Scope
Release the tunnel handle before the early return, as PostgreSQL does.
Mark the in-flight attempt as cancelled so it closes what it opened instead of reviving it.
Test: forceClose while a (fake) connect is pending.
Acceptance
The tunnel's ref-count is back to zero after forceClose during connect.
The interrupted connection is not connected afterwards.
Activity
Merge pull request #1326 from QueryaHub/fix/1313-mysql-forceclose-con…
ZhuchkaTriplesix commentedon Oct 10, 2026
Сделано в #1326, смержено в dev.