mirror of
https://github.com/sprockets/sprockets.mixins.metrics.git
synced 2024-11-21 19:28:34 +00:00
Fakeserver check for \n in tcp stream, const name changed to TCP_PATTERN
This commit is contained in:
parent
5599e9f73b
commit
b24a3699a5
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ class FakeStatsdServer(tcpserver.TCPServer):
|
|||
|
||||
"""
|
||||
|
||||
PATTERN = br'(?P<path>[^:]*):(?P<value>[^|]*)\|(?P<type>.*)$'
|
||||
TCP_PATTERN = br'(?P<path>[^:]*):(?P<value>[^|]*)\|(?P<type>.*)\n$'
|
||||
|
||||
def __init__(self, iol, protocol='udp'):
|
||||
self.datagrams = []
|
||||
|
@ -71,7 +71,7 @@ class FakeStatsdServer(tcpserver.TCPServer):
|
|||
def handle_stream(self, stream, address):
|
||||
while True:
|
||||
try:
|
||||
result = yield stream.read_until_regex(self.PATTERN)
|
||||
result = yield stream.read_until_regex(self.TCP_PATTERN)
|
||||
except iostream.StreamClosedError:
|
||||
break
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue