# HG changeset patch # User Sylvain Thénault # Date 1267167482 -3600 # Node ID 4d9ad6a4f2610435671752d7a990a538f3d40990 # Parent 6a71fc0b42749946745deb34b61807e473a6ded5 [pool] properly close existing connection before reconnection diff -r 6a71fc0b4274 -r 4d9ad6a4f261 server/pool.py --- a/server/pool.py Fri Feb 26 07:44:18 2010 +0100 +++ b/server/pool.py Fri Feb 26 07:58:02 2010 +0100 @@ -109,6 +109,11 @@ else: sources = (source,) for source in sources: + try: + # properly close existing connection if any + self.source_cnxs[source.uri][1].close() + except: + pass source.info('trying to reconnect') self.source_cnxs[source.uri] = (source, source.get_connection()) self._cursors.pop(source.uri, None)