Skip to content

Commit

Permalink
Merge pull request #20 from nijel/proto-length
Browse files Browse the repository at this point in the history
Fix length calculation in protocol
  • Loading branch information
coderanger committed Jul 22, 2020
2 parents 87632a7 + 4dcc3de commit 5eeff27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion supervisor_stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
line = sys.stdin.readline() # read header line from stdin
headers = dict([ x.split(':') for x in line.split() ])
data = sys.stdin.read(int(headers['len'])) # read the event payload
write_stdout('RESULT %s\n%s'%(len(data), data)) # transition from READY to ACKNOWLEDGED
write_stdout('RESULT %s\n%s'%(len(data.encode("utf-8")), data)) # transition from READY to ACKNOWLEDGED

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

0 comments on commit 5eeff27

Please sign in to comment.