summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/psycopg2.py
diff options
context:
space:
mode:
authorAndré Cruz <andre@cabine.org>2018-02-15 11:09:47 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2018-02-15 12:46:02 -0500
commit2f03ec08b5a1c633133c0a38d82b05eb83708f69 (patch)
treed9d64b5ea58ac060fb9cf028679518b89acad9cd /lib/sqlalchemy/dialects/postgresql/psycopg2.py
parent6c6a7720f221d255a9c8abaec24fc5272403019b (diff)
downloadsqlalchemy-2f03ec08b5a1c633133c0a38d82b05eb83708f69.tar.gz
Add ssl "operation timed out" message for psycopg2
Added "SSL SYSCALL error: Operation timed out" to the list of messages that trigger a "disconnect" scenario for the psycopg2 driver. Pull request courtesy André Cruz. Change-Id: Ie1a8fc97e74b6906ccacf53dad70fed973c42b7f Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/3
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg2.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
index 81e1ade8a..2a949c443 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
@@ -730,6 +730,7 @@ class PGDialect_psycopg2(PGDialect):
'SSL SYSCALL error: Bad file descriptor',
'SSL SYSCALL error: EOF detected',
'SSL error: decryption failed or bad record mac',
+ 'SSL SYSCALL error: Operation timed out',
]:
idx = str_e.find(msg)
if idx >= 0 and '"' not in str_e[:idx]: