Ignore upcall_flush for channels that are disassociated from ports. This makes task-comm-10 break a little less hard, but it still leaks because messages pending in the channel are never freed.

This commit is contained in:
Michael Bebenita
2010-08-11 16:08:26 -07:00
parent c56ecc1d56
commit 74e12fcef6
5 changed files with 17 additions and 4 deletions

View File

@@ -116,6 +116,14 @@ upcall_flush_chan(rust_task *task, rust_chan *chan) {
return;
}
// We cannot flush if the target port was dropped.
if (chan->is_associated() == false) {
return;
}
A(dom, chan->is_associated(),
"Channel should be associated to a port.");
A(dom, chan->port->is_proxy() == false,
"Channels to remote ports should be flushed automatically.");