]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add ssl "operation timed out" message for psycopg2
authorAndré Cruz <andre@cabine.org>
Thu, 15 Feb 2018 16:09:47 +0000 (11:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 15 Feb 2018 17:48:43 +0000 (12:48 -0500)
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
(cherry picked from commit 2f03ec08b5a1c633133c0a38d82b05eb83708f69)

doc/build/changelog/unreleased_11/pgssl_timeout.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/psycopg2.py

diff --git a/doc/build/changelog/unreleased_11/pgssl_timeout.rst b/doc/build/changelog/unreleased_11/pgssl_timeout.rst
new file mode 100644 (file)
index 0000000..1916b16
--- /dev/null
@@ -0,0 +1,7 @@
+.. change::
+    :tags: bug, postgresql
+    :versions: 1.2.3
+
+    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.
index 32e653c750f22f7ae4332e028b3bb1c7cc706ae2..f796ab497f76cdf04ba902ab65c73bbcf18d2d39 100644 (file)
@@ -692,6 +692,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]: