[PR #1668] [MERGED] fix panic when tcp connect goes away before handling #2492

Closed
opened 2026-03-16 09:05:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1668
Author: @bluejekyll
Created: 3/25/2022
Status: Merged
Merged: 3/28/2022
Merged by: @djc

Base: mainHead: fix-panic-on-tcp-conn-gone


📝 Commits (1)

  • ff4b8e7 fix panic when tcp connect goes away before handling

📊 Changes

1 file changed (+8 additions, -12 deletions)

View changed files

📝 crates/server/src/server/server_future.rs (+8 -12)

📄 Description

fixes: #1664

It looks like we were doing something silly and not using the socket_addr returned on accept, instead unwraping when we assume the connection is still there. This avoids a panic when the TCP connection is dropped before handling on the server. This is a really rare edge condition, but clearly is happening.


🔄 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/1668 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 3/25/2022 **Status:** ✅ Merged **Merged:** 3/28/2022 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `fix-panic-on-tcp-conn-gone` --- ### 📝 Commits (1) - [`ff4b8e7`](https://github.com/hickory-dns/hickory-dns/commit/ff4b8e7cc5fb56c51ee4175e6f04a9e27274d8b0) fix panic when tcp connect goes away before handling ### 📊 Changes **1 file changed** (+8 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/server/src/server/server_future.rs` (+8 -12) </details> ### 📄 Description fixes: #1664 It looks like we were doing something silly and not using the socket_addr returned on accept, instead unwraping when we assume the connection is still there. This avoids a panic when the TCP connection is dropped before handling on the server. This is a really rare edge condition, but clearly is happening. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 09:05:02 +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#2492
No description provided.