FAForever / FAForever/client

Stalled download can cause client to become unresponsive

Open
#853 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
78
Forks
89
Avg merge
22d 15h
Merged PRs (30d)
1

Description

**I experienced...** write here what happened to you or what the current behaviour is.
My network is pretty crappy.
Some downloads stop receiving packets without the tcp connection being severed

In some situations this causes the FAF lobby to become un-responsive during mod updates, and prevents me from playing :(

**how to reproduce** if explanation is needed to reproduce the problem, add it here
It's super hard to reproduce. You basically need a way to stop packets from returning from the server part way through a download.

**I expected...** write here what you think the best behaviour should be
Ideally the socket timeout should match the urllib timeout that you've set (20 seconds) then I'd get a normal "download failed" message, and I could retry.

**Where the bug is / What should be done** if you have a suggestion for fixing the issue, add it here.
I'm reasonably certain the problem lies in the block:
https://github.com/FAForever/client/blob/develop/src/fa/updater.py#L344-L353
specifically the read method call on 348 won't respect the timout set by UrlLib, given the read call blocks indefinitely, the process events method in QT is never called, so the UI becomes unresponsive.
It's discussed in this stack overflow question, and the accepted response provides a mechanism for setting that timeout
https://stackoverflow.com/questions/811446/reading-a-stream-made-by-urllib2-never-recovers-when-connection-got-interrupted

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.