提交 20d40f08 编写于 作者: M me-no-dev
上级 1b3e8fa2
...@@ -172,14 +172,14 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm ...@@ -172,14 +172,14 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
sys.stderr.flush() sys.stderr.flush()
offset = 0 offset = 0
while True: while True:
chunk = f.read(1460) chunk = f.read(1024)
if not chunk: break if not chunk: break
offset += len(chunk) offset += len(chunk)
update_progress(offset/float(content_size)) update_progress(offset/float(content_size))
connection.settimeout(10) connection.settimeout(10)
try: try:
connection.sendall(chunk) connection.sendall(chunk)
res = connection.recv(5) res = connection.recv(10)
except: except:
sys.stderr.write('\n') sys.stderr.write('\n')
logging.error('Error Uploading') logging.error('Error Uploading')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册