Skip to content

Commit b33a6fc

Browse files
committed
Not consuming responses for subscribe commands.
1 parent 7b1f196 commit b33a6fc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

redis/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,15 @@ def _execute_command(self, command_name, command, **options):
258258
"UNSUBSCRIBE while channels are open")
259259
try:
260260
self.connection.send(command, self)
261-
response = self.parse_response(command_name, **options)
262261
if subscription_command:
263262
return None
264-
return response
263+
return self.parse_response(command_name, **options)
265264
except ConnectionError:
266265
self.connection.disconnect()
267266
self.connection.send(command, self)
268-
response = self.parse_response(command_name, **options)
269267
if subscription_command:
270268
return None
271-
return response
269+
return self.parse_response(command_name, **options)
272270

273271
def execute_command(self, *args, **options):
274272
"Sends the command to the redis server and returns it's response"

0 commit comments

Comments
 (0)