mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue that could cause the Query Tool to fail to render. Fixes #3433
This commit is contained in:
committed by
Dave Page
parent
dfbb2212c0
commit
e666b0fab0
@@ -169,6 +169,7 @@ class BaseConnection(object):
|
||||
ASYNC_NOT_CONNECTED = 4
|
||||
ASYNC_EXECUTION_ABORTED = 5
|
||||
ASYNC_TIMEOUT = 0.2
|
||||
ASYNC_WAIT_TIMEOUT = 2
|
||||
ASYNC_NOTICE_MAXLENGTH = 100000
|
||||
|
||||
@abstractmethod
|
||||
|
||||
@@ -1335,9 +1335,11 @@ Failed to reset the connection to the server due to following error:
|
||||
if state == psycopg2.extensions.POLL_OK:
|
||||
break
|
||||
elif state == psycopg2.extensions.POLL_WRITE:
|
||||
select.select([], [conn.fileno()], [])
|
||||
select.select([], [conn.fileno()], [],
|
||||
self.ASYNC_WAIT_TIMEOUT)
|
||||
elif state == psycopg2.extensions.POLL_READ:
|
||||
select.select([conn.fileno()], [], [])
|
||||
select.select([conn.fileno()], [], [],
|
||||
self.ASYNC_WAIT_TIMEOUT)
|
||||
else:
|
||||
raise psycopg2.OperationalError(
|
||||
"poll() returned %s from _wait function" % state)
|
||||
|
||||
Reference in New Issue
Block a user