Skip to content

Commit 5eeff27

Browse files
authored
Merge pull request #20 from nijel/proto-length
Fix length calculation in protocol
2 parents 87632a7 + 4dcc3de commit 5eeff27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

supervisor_stdout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def main():
1515
line = sys.stdin.readline() # read header line from stdin
1616
headers = dict([ x.split(':') for x in line.split() ])
1717
data = sys.stdin.read(int(headers['len'])) # read the event payload
18-
write_stdout('RESULT %s\n%s'%(len(data), data)) # transition from READY to ACKNOWLEDGED
18+
write_stdout('RESULT %s\n%s'%(len(data.encode("utf-8")), data)) # transition from READY to ACKNOWLEDGED
1919

2020
def event_handler(event, response):
2121
line, data = response.split('\n', 1)

0 commit comments

Comments
 (0)