Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Sweep panickers from IO and network #3018

Merged
merged 2 commits into from
Oct 31, 2016
Merged

Sweep panickers from IO and network #3018

merged 2 commits into from
Oct 31, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Oct 31, 2016

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Oct 31, 2016
@@ -399,8 +399,8 @@ impl<Message> IoService<Message> where Message: Send + Sync + Clone + 'static {
let thread = thread::spawn(move || {
let p = panic.clone();
panic.catch_panic(move || {
IoManager::<Message>::start(p, &mut event_loop, h).unwrap();
}).unwrap()
IoManager::<Message>::start(p, &mut event_loop, h).expect("Error startting IO service");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: startting

@@ -434,7 +434,9 @@ impl<Message> Drop for IoService<Message> where Message: Send + Sync + Clone {
fn drop(&mut self) {
trace!(target: "shutdown", "[IoService] Closing...");
self.host_channel.lock().send(IoMessage::Shutdown).unwrap_or_else(|e| warn!("Error on IO service shutdown: {:?}", e));
self.thread.take().unwrap().join().ok();
if let Some(thread) = self.thread.take() {
thread.join().ok();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could warn/log when result not ok -- seems to just silence errors here.

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Oct 31, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling bca041a on panic-sweep into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling bca041a on panic-sweep into * on master*.

@arkpar arkpar merged commit 2e70abd into master Oct 31, 2016
@gavofyork gavofyork deleted the panic-sweep branch November 3, 2016 11:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants