Commits

Mike Bayer committed 9092ec6

fix to timeout

Comments (0)

Files changed (1)

lib/sqlalchemy/pool.py

         try:
             return self._pool.get(self._max_overflow > -1 and self._overflow >= self._max_overflow, self._timeout)
         except Queue.Empty:
-            if self._overflow >= self._max_overflow:
+            if self._max_overflow > -1 and self._overflow >= self._max_overflow:
                 raise exceptions.TimeoutError("QueuePool limit of size %d overflow %d reached, connection timed out" % (self.size(), self.overflow()))
             self._overflow += 1
             return self._creator()