webdriver: Name http server thread for debugging.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: b74083e44bb76cdafc1758849618b16161c2c20d

--HG--
extra : subtree_source : http%3A//tristan.corp.lon2.mozilla.com%3A8000
extra : subtree_revision : 698c098280c8b63c06e1a2af1b2b9d40aec76b4b
This commit is contained in:
James Graham 2015-05-01 15:11:09 +01:00
Родитель 34dadf639b
Коммит fd874a1830
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -196,7 +196,7 @@ impl Handler for HttpHandler {
Ok(response) => (StatusCode::Ok, response.to_json_string()),
Err(err) => (err.http_status(), err.to_json_string()),
},
Err(_) => panic!("Error reading response")
Err(e) => panic!("Error reading response: {:?}", e)
}
},
Err(err) => {
@ -226,9 +226,10 @@ pub fn start<T: 'static+WebDriverHandler>(address: SocketAddr, handler: T) {
let http_handler = HttpHandler::new(api, msg_send);
let server = Server::http(http_handler);
thread::spawn(move || {
let builder = thread::Builder::new().name("webdriver dispatcher".to_string());
builder.spawn(move || {
let mut dispatcher = Dispatcher::new(handler);
dispatcher.run(msg_recv)
});
}).unwrap();
server.listen(&address).unwrap();
}