Skip to content

Fix hungup when max_open_connections=0 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include README.rst LICENSE CHANGELOG
include runtests.py tox.ini
include example.py example_pool
9 changes: 1 addition & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
#!/usr/bin/env python
from setuptools import setup, find_packages

try:
with open('README.rst') as f:
readme = f.read()
except IOError:
readme = ''

setup(
name="Tornado-MySQL",
version="0.4",
version="0.5",
url='https://github.com/PyMySQL/Tornado-MySQL',
author='INADA Naoki',
author_email='songofacandy@gmail.com',
description='Pure Python MySQL Driver for Tornado',
install_requires=['tornado>=4.0'],
long_description=readme,
license="MIT",
packages=find_packages(),
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tornado_mysql/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _get_conn(self):
return fut

# Open new connection
if self.max_open and self._opened_conns < self.max_open:
if self.max_open == 0 or self._opened_conns < self.max_open:
self._opened_conns += 1
_debug("Creating new connection:", self.stat())
return connect(**self.connect_kwargs)
Expand Down