Skip to content

Commit

Permalink
Fix monitor regex bug (#2950)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h committed Sep 19, 2023
1 parent 0acd0e7 commit 2df75ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion redis/asyncio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ class Monitor:
listen() method yields commands from monitor.
"""

monitor_re = re.compile(r"\[(\d+) (.*)\] (.*)")
monitor_re = re.compile(r"\[(\d+) (.*?)\] (.*)")
command_re = re.compile(r'"(.*?)(?<!\\)"')

def __init__(self, connection_pool: ConnectionPool):
Expand Down
2 changes: 1 addition & 1 deletion redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ class Monitor:
listen() method yields commands from monitor.
"""

monitor_re = re.compile(r"\[(\d+) (.*)\] (.*)")
monitor_re = re.compile(r"\[(\d+) (.*?)\] (.*)")
command_re = re.compile(r'"(.*?)(?<!\\)"')

def __init__(self, connection_pool):
Expand Down

0 comments on commit 2df75ad

Please sign in to comment.