mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Make sure to use bytesize instead of size when writing data in the
MiniSSL's write. @engine.write reports bytes written, not characters written.
This commit is contained in:
parent
ac8a9fb49e
commit
eac3cc7f82
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ module Puma
|
|||
end
|
||||
|
||||
def write(data)
|
||||
need = data.size
|
||||
need = data.bytesize
|
||||
|
||||
while true
|
||||
wrote = @engine.write data
|
||||
|
@ -58,7 +58,7 @@ module Puma
|
|||
|
||||
need -= wrote
|
||||
|
||||
return data.size if need == 0
|
||||
return data.bytesize if need == 0
|
||||
|
||||
data = data[need..-1]
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue