diff options
author | Maria Matejka <mq@ucw.cz> | 2022-10-06 17:51:32 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-10-12 10:05:14 +0200 |
commit | 2ae32374dd17cb3b22d9ee35265ed27490643924 (patch) | |
tree | de0c3b48be81e7c3391c406ed3772abe7bfa5573 /nest/proto.c | |
parent | 6abef2b20b88ec2aa747ff3885d7fd1c7d147cef (diff) |
Fixed export hook stopping in some corner cases.
Notably, it's in a corked state and also when refeed is pending.
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nest/proto.c b/nest/proto.c index 2f3515b9..fcdedda5 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -739,7 +739,9 @@ channel_do_pause(struct channel *c) } /* Stop export */ - if (c->out_req.hook) + if (c->refeed_pending) + c->refeed_pending = 0; + else if (c->out_req.hook) rt_stop_export(&c->out_req, channel_export_stopped); channel_roa_unsubscribe_all(c); @@ -863,6 +865,9 @@ channel_request_feeding(struct channel *c) { ASSERT(c->out_req.hook); + if (c->refeed_pending) + return; + c->refeed_pending = 1; rt_stop_export(&c->out_req, channel_export_stopped); } |