fix: close WS on client after last chunk, no DONE needed, bump 1.0.13→1.0.14
Deploy loadtest / validate (push) Waiting to run
Deploy loadtest / validate (push) Waiting to run
This commit is contained in:
+1
-3
@@ -7,7 +7,7 @@ from flask_sock import Sock
|
||||
app = Flask(__name__)
|
||||
sock = Sock(app)
|
||||
|
||||
VERSION = '1.0.13'
|
||||
VERSION = '1.0.14'
|
||||
|
||||
|
||||
@app.route('/')
|
||||
@@ -29,8 +29,6 @@ def ws_upload(ws):
|
||||
chunk = ws.receive()
|
||||
if chunk is None:
|
||||
break
|
||||
if isinstance(chunk, str) and chunk == 'DONE':
|
||||
break
|
||||
total += len(chunk)
|
||||
elapsed = round((time.time() - t0) * 1000)
|
||||
ws.send(json.dumps({'ok': True, 'bytes': total, 'elapsed_ms': elapsed}))
|
||||
|
||||
Reference in New Issue
Block a user