server/repository.py
changeset 7068 90ddf608fe2b
parent 6957 ffda12be2e9f
parent 7064 b8ce2266d026
child 7085 36e91d19188b
--- a/server/repository.py	Tue Mar 08 22:35:19 2011 +0100
+++ b/server/repository.py	Thu Mar 10 11:58:57 2011 +0100
@@ -536,7 +536,13 @@
             return self.config[option]
         pool = self._get_pool()
         try:
-            return pool.connection(sourceuri).get_option_value(option, extid)
+            cnx = pool.connection(sourceuri)
+            # needed to check connection is valid and usable by the current
+            # thread
+            newcnx = self.sources_by_uri[sourceuri].check_connection(cnx)
+            if newcnx is not None:
+                cnx = newcnx
+            return cnx.get_option_value(option, extid)
         finally:
             self._free_pool(pool)