Skip to content

Commit 5cba088

Browse files
committed
bugfix, if initial connect failed, mark connection as closed
1 parent 310a445 commit 5cba088

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pyredis/connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def _connect_inet46(self):
132132
socket.timeout,
133133
OSError
134134
) as err:
135+
self.close()
135136
raise PyRedisConnError('Could not Connect to {0}:{1}: {2}'.format(
136137
self.host,
137138
self.port,
@@ -151,6 +152,7 @@ def _connect_unix(self):
151152
socket.timeout,
152153
OSError
153154
) as err:
155+
self.close()
154156
raise PyRedisConnError('Could not Connect to {0}: {1}'.format(
155157
self.host,
156158
err

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='python_redis',
5-
version='0.1.2',
5+
version='0.1.3',
66
description='Redis Client',
77
long_description="""
88
Redis Client implementation for Python 3.

0 commit comments

Comments
 (0)