mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
708d11f54a
When sending a response to a client, we attach a releasing listener to the channel promise. If the client disappears before the response is sent, the releasing listener was never notified. The reason the listeners were never notified was due to a mistaken invocation of write and flush on the channel which has two overrides: one that takes an existing promise, and one that does not and instead creates a new promise. When the client disappears, it is this latter promise that is notified, which does not contain the releasing listener. This commit addreses this issue by invoking the override that passes our channel promise through. Relates #23310