Skip to content

Commit

Permalink
Send logging messages even if the channel lock is poisoned.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Jul 28, 2016
1 parent 82f734b commit 3646ddd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/constellation/constellation.rs
Expand Up @@ -342,9 +342,8 @@ impl Log for FromScriptLogger {
let pipeline_id = PipelineId::installed();
let thread_name = thread::current().name().map(ToOwned::to_owned);
let msg = FromScriptMsg::LogEntry(pipeline_id, thread_name, entry);
if let Ok(chan) = self.constellation_chan.lock() {
let _ = chan.send(msg);
}
let chan = self.constellation_chan.lock().unwrap_or_else(|err| err.into_inner());
let _ = chan.send(msg);
}
}
}
Expand Down Expand Up @@ -381,9 +380,8 @@ impl Log for FromCompositorLogger {
let pipeline_id = PipelineId::installed();
let thread_name = thread::current().name().map(ToOwned::to_owned);
let msg = FromCompositorMsg::LogEntry(pipeline_id, thread_name, entry);
if let Ok(chan) = self.constellation_chan.lock() {
let _ = chan.send(msg);
}
let chan = self.constellation_chan.lock().unwrap_or_else(|err| err.into_inner());
let _ = chan.send(msg);
}
}
}
Expand Down

0 comments on commit 3646ddd

Please sign in to comment.