Skip to content

Commit a8bf82f

Browse files
committed
Make PythonParser's on_disconnect consistent with
Hiredisparser and Connection — do not close socket on disconnect. Resolves #1085
1 parent 6020f43 commit a8bf82f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

redis/connection.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,7 @@ def on_connect(self, connection):
276276

277277
def on_disconnect(self):
278278
"Called when the socket disconnects"
279-
if self._sock is not None:
280-
self._sock.close()
281-
self._sock = None
279+
self._sock = None
282280
if self._buffer is not None:
283281
self._buffer.close()
284282
self._buffer = None

0 commit comments

Comments
 (0)