mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
right length
This commit is contained in:
parent
77ea9ea78a
commit
6ca87c5cf4
@ -90,8 +90,11 @@ def close(sock):
|
||||
pass
|
||||
|
||||
def read_partial(sock, length, buf=None):
|
||||
if buf is not None and len(buf) >= length:
|
||||
return buf
|
||||
if buf is not None:
|
||||
if len(buf) >= length:
|
||||
return buf
|
||||
else:
|
||||
length = length - len(buf)
|
||||
|
||||
tmp_buf = sock.recv(length)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user