diff -r 55366f5b7a9f -r a7e40cccdc9b server/sources/native.py --- a/server/sources/native.py Tue Jun 01 08:34:35 2010 +0200 +++ b/server/sources/native.py Wed Jun 02 13:02:47 2010 +0200 @@ -444,7 +444,15 @@ self.warning("trying to reconnect") session.pool.reconnect(self) cursor = self.doexec(session, sql, args) - results = self.process_result(cursor, cbs) + except (self.DbapiError,), exc: + # We get this one with pyodbc and SQL Server when connection was reset + if exc.args[0] == '08S01': + self.warning("trying to reconnect") + session.pool.reconnect(self) + cursor = self.doexec(session, sql, args) + else: + raise + results = self.process_result(cursor, cbs, session=session) assert dbg_results(results) return results