Fix unmetered upload over cell (fix #23811) (#23820)

pull/23823/head
Robbe Derks 2022-02-22 13:01:53 +01:00 committed by GitHub
parent 412e43206e
commit a6214ff3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ def upload_handler(end_event: threading.Event) -> None:
# Abort transfer if connection changed to cell after starting upload
sm.update(0)
cell = sm['deviceState'].networkType not in [NetworkType.wifi, NetworkType.ethernet]
if cell and (not cur_upload_items[tid].allow_cellular):
if cell and (not cur_upload_items[tid].allow_cellular) and (not cellular_unmetered):
raise AbortTransferException
cur_upload_items[tid] = cur_upload_items[tid]._replace(progress=cur / sz if sz else 1)