From b4c65086af9adf174fbb696b717a6f50fb9be303 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sat, 1 Oct 2016 12:18:13 -0700 Subject: [PATCH] fix(client): Spawn DNS threads with name Resolves #918. --- src/client/dns.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/dns.rs b/src/client/dns.rs index 0c2a2226fb..c0dcd359c7 100644 --- a/src/client/dns.rs +++ b/src/client/dns.rs @@ -48,7 +48,7 @@ impl Dns { } fn work(rx: spmc::Receiver, notify: channel::Sender) { - 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"); @@ -64,7 +64,7 @@ fn work(rx: spmc::Receiver, notify: channel::Sender) { } } worker.shutdown = true; - }); + }).expect("spawn dns thread"); } struct Worker {