[PR #1587] [MERGED] Release resources when a server future is dropped. #2438

Closed
opened 2026-03-16 08:53:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1587
Author: @pinkisemils
Created: 11/17/2021
Status: Merged
Merged: 11/18/2021
Merged by: @djc

Base: mainHead: ensure-server-cleanup


📝 Commits (1)

  • fdc641b Abort server tasks when ServerFuture is dropped.

📊 Changes

1 file changed (+67 additions, -14 deletions)

View changed files

📝 crates/server/src/server/server_future.rs (+67 -14)

📄 Description

When a ServerFuture is dropped, the futures it had spawned during setup are not cleaned up, which essentially leaks the listening sockets. I've added changes to remedy this by wrapping the join handles in a type which will have a Drop implementation that will abort the futures.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1587 **Author:** [@pinkisemils](https://github.com/pinkisemils) **Created:** 11/17/2021 **Status:** ✅ Merged **Merged:** 11/18/2021 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `ensure-server-cleanup` --- ### 📝 Commits (1) - [`fdc641b`](https://github.com/hickory-dns/hickory-dns/commit/fdc641b206d7e355c500a12ab0b939d74ebfde10) Abort server tasks when ServerFuture is dropped. ### 📊 Changes **1 file changed** (+67 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/server/src/server/server_future.rs` (+67 -14) </details> ### 📄 Description When a `ServerFuture` is dropped, the futures it had spawned during setup are not cleaned up, which essentially leaks the listening sockets. I've added changes to remedy this by wrapping the join handles in a type which will have a `Drop` implementation that will abort the futures. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:53:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2438
No description provided.