Skip to content

Commit 942b504

Browse files
committed
postgis connector - avoid plugin hangs on loading by setting a default timeout
1 parent acde10b commit 942b504

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

connectors/postgis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def __init__(self, uri):
153153
self.passwd = uri.password()
154154

155155
try:
156-
self.con = psycopg2.connect(self.con_info())
156+
self.con = psycopg2.connect(self.con_info(), connect_timeout=10)
157157
except psycopg2.OperationalError as e:
158158
raise DbError(e)
159159

0 commit comments

Comments
 (0)