added code to prevent newlines being where they shouldn't be in outgoing lines.
This commit is contained in:
parent
8843d9a469
commit
957947cf8d
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ class Server(object):
|
||||||
self.last_read = time.time()
|
self.last_read = time.time()
|
||||||
return decoded_lines
|
return decoded_lines
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
encoded = data.encode("utf8")
|
encoded = data.split("\n")[0].strip("\r").encode("utf8")
|
||||||
if len(encoded) > 450:
|
if len(encoded) > 450:
|
||||||
encoded = encoded[:450]
|
encoded = encoded[:450]
|
||||||
self.write_buffer += b"%s\r\n" % encoded
|
self.write_buffer += b"%s\r\n" % encoded
|
||||||
|
|
Loading…
Reference in a new issue