mirror of https://github.com/kivy/kivy.git
Merge branch 'master' of ssh://github.com/kivy/kivy
This commit is contained in:
commit
883540bc6d
|
@ -155,7 +155,8 @@ class UrlRequest(Thread):
|
|||
else:
|
||||
q(('success', resp, result))
|
||||
|
||||
self._trigger_result()
|
||||
# using trigger can result in a missed on_success event
|
||||
self._dispatch_result(0)
|
||||
|
||||
def _fetch_url(self, url, body, headers, q):
|
||||
# Parse and fetch the current url
|
||||
|
@ -219,6 +220,10 @@ class UrlRequest(Thread):
|
|||
# report progress to user
|
||||
q(('progress', resp, (bytes_so_far, total_size)))
|
||||
trigger()
|
||||
# ensure that restults are dispatch for the last chunk,
|
||||
# avaoid trigger
|
||||
self._dispatch_result(0)
|
||||
q(('progress', resp, (bytes_so_far, total_size)))
|
||||
else:
|
||||
result = resp.read()
|
||||
req.close()
|
||||
|
|
Loading…
Reference in New Issue