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:
@@ -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.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user