Skip to content

Commit

Permalink
Fix: Log update thread do not exit after call ownerAPI. (#284) (#296)
Browse files Browse the repository at this point in the history
Co-authored-by: jdwldnqi837 <47104234+jdwldnqi837@users.noreply.github.com>
  • Loading branch information
yeastplume and jdwldnqi837 authored Jan 17, 2020
1 parent a06a260 commit 4d7e55e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libwallet/src/api_impl/owner_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pub fn start_updater_log_thread(
) -> Result<(), Error> {
let _ = thread::Builder::new()
.name("wallet-updater-status".to_string())
.spawn(move || loop {
while let Ok(m) = rx.try_recv() {
.spawn(move || {
while let Ok(m) = rx.recv() {
// save to our message queue to be read by other consumers
{
let mut q = queue.lock();
Expand All @@ -79,7 +79,6 @@ pub fn start_updater_log_thread(
StatusMessage::UpdateWarning(s) => warn!("{}", s),
}
}
thread::sleep(Duration::from_millis(500));
})?;

Ok(())
Expand Down

0 comments on commit 4d7e55e

Please sign in to comment.