SSL.read computes max and nothing reads it:
let max = if expect > 0 then expect - offset else USize.max_value() end
It is at ssl/net/ssl.pony:201, the only mention of the name in the file.
Removing it changes nothing. Where expect > 0, len already holds expect - offset and len.min(pending) caps the read at that value. Where expect == 0, max is USize.max_value() and caps nothing.
SSL.readcomputesmaxand nothing reads it:It is at
ssl/net/ssl.pony:201, the only mention of the name in the file.Removing it changes nothing. Where
expect > 0,lenalready holdsexpect - offsetandlen.min(pending)caps the read at that value. Whereexpect == 0,maxisUSize.max_value()and caps nothing.