diff options
author | Iuri de Silvio <iurisilvio@gmail.com> | 2016-05-13 21:20:54 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-05-13 21:26:42 -0400 |
commit | 06fd549df499c654817f325402c737bb69c74021 (patch) | |
tree | 00a96c272593b5d4ee6cf17573ecdc8d58bfa9eb | |
parent | 1959263338d96af0aa6967e62296c2b9b325699a (diff) | |
download | sqlalchemy-06fd549df499c654817f325402c737bb69c74021.tar.gz |
Handle `SSL error: decryption failed or bad record mac`
This is another psycopg2 error message representing an
unusable connection.
Fixes #3715
Change-Id: Ida6e212963e9c7336bf2944e7ef928619ac3a0e7
(cherry picked from commit 8ecad78ba3473d97df8ed4f20f28ddf966ce0277)
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/85
-rw-r--r-- | doc/build/changelog/changelog_10.rst | 8 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/build/changelog/changelog_10.rst b/doc/build/changelog/changelog_10.rst index e508e7b81..30f8fb73e 100644 --- a/doc/build/changelog/changelog_10.rst +++ b/doc/build/changelog/changelog_10.rst @@ -19,6 +19,14 @@ :version: 1.0.13 .. change:: + :tags: bug, postgresql + :tickets: 3715 + + Added disconnect detection support for the error string + "SSL error: decryption failed or bad record mac". Pull + request courtesy Iuri de Silvio. + + .. change:: :tags: bug, mssql :tickets: 3711 diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index a0f0cca75..061408109 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -717,6 +717,7 @@ class PGDialect_psycopg2(PGDialect): 'connection has been closed unexpectedly', 'SSL SYSCALL error: Bad file descriptor', 'SSL SYSCALL error: EOF detected', + 'SSL error: decryption failed or bad record mac', ]: idx = str_e.find(msg) if idx >= 0 and '"' not in str_e[:idx]: |