Page MenuHomePhabricator

channel delayed closure is never handled
Open, HighPublic


when a remote close is received and output buffers aren't empty yet, the local channel is left in open state and delayed//close is set.

when the buffers are later emptied, the local channel state is however not closed.

using the channel close callback helps in detecting this condition, but it shouldn't be needed and (unless the channel is also explicitly requested to be closed locally upon this detection) doesn't solve the fact that the local state remains wrong.

i found this reported in this thread already:
but not as a bug.

the source mentions some TODO to fix the delayed close, perhaps this issue is what that refers to.


Event Timeline

migration created this object with visibility "Restricted Project (Project)".
migration created this object with edit policy "Restricted Project (Project)".
asn raised the priority of this task from Normal to High.Sep 4 2018, 9:15 PM
asn changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".

@ansasaki isn't this fixed with 750e4f3f9d3ec879929801d65a500ec3ad84ff67 or something else? I remember we talked about some issue like this ...

I think this is a way to solve this issue:


Improved patch:

Improved it further:

@tmds Can you submit your change as a merge request in

It will make it easier for us to review the changes, making sure it does not break any tests.

Ideally also with a test case reproducing this issue before the patch is applied.

The code looks fine from fast review, but mind the formatting described in the following document (there are couple of places where it is not followed):