Updater fixes (#4196)

* Minor typo to ensure it updates only when synced.

* Fix deadlock.

* Skip unneeded arg in making list.

* Allow auto-restart even when not running an update.

* Fix trace.

* Update update info on each loop.

* Fix build.

* Shutdown all sockets

* Remove superfluous use.
This commit is contained in:
Arkadiy Paronyan
2017-01-17 23:34:46 +01:00
committed by Gav Wood
parent 8852a05301
commit 7cab6ac263
2 changed files with 30 additions and 8 deletions

View File

@@ -273,6 +273,7 @@ impl Updater {
if s.fetching.is_none() {
info!(target: "updater", "Attempting to get parity binary {}", b);
s.fetching = Some(latest.track.clone());
drop(s);
let weak_self = self.weak_self.lock().clone();
let f = move |r: Result<PathBuf, fetch::Error>| if let Some(this) = weak_self.upgrade() { this.fetch_done(r) };
self.fetcher.lock().as_ref().expect("Created on `new`; qed").fetch(b, Box::new(f));