Skip to content

Commit

Permalink
fix(client): Spawn DNS threads with name
Browse files Browse the repository at this point in the history
Resolves #918.
  • Loading branch information
jwilm committed Oct 1, 2016
1 parent a6064a6 commit b4c6508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Dns {
}

fn work(rx: spmc::Receiver<String>, notify: channel::Sender<Answer>) {
thread::spawn(move || {
thread::Builder::new().name(String::from("hyper-dns")).spawn(move || {
let mut worker = Worker::new(rx, notify);
let rx = worker.rx.as_ref().expect("Worker lost rx");
let notify = worker.notify.as_ref().expect("Worker lost notify");
Expand All @@ -64,7 +64,7 @@ fn work(rx: spmc::Receiver<String>, notify: channel::Sender<Answer>) {
}
}
worker.shutdown = true;
});
}).expect("spawn dns thread");
}

struct Worker {
Expand Down

0 comments on commit b4c6508

Please sign in to comment.