[PR #5022] [MERGED] Fix CloseNotifyConn.Close function #5103

Closed
opened 2026-05-05 14:54:44 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/5022
Author: @zachwhaley
Created: 10/16/2025
Status: Merged
Merged: 10/17/2025
Merged by: @fatedier

Base: devHead: fix-conn-close-bug


📝 Commits (1)

  • 12888e9 Fix CloseNotifyConn.Close function

📊 Changes

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

View changed files

📝 pkg/util/net/conn.go (+1 -1)

📄 Description

WHY

The CloseNotifyConn.Close function calls itself if the closeFlag is equal to 0 which would mean it would immediately swap the closeFlag value to 1 and never call closeFn. It is unclear what the intent of this call to cc.Close() was but I assume it was meant to be a call to close the Conn object instead.


🔄 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/fatedier/frp/pull/5022 **Author:** [@zachwhaley](https://github.com/zachwhaley) **Created:** 10/16/2025 **Status:** ✅ Merged **Merged:** 10/17/2025 **Merged by:** [@fatedier](https://github.com/fatedier) **Base:** `dev` ← **Head:** `fix-conn-close-bug` --- ### 📝 Commits (1) - [`12888e9`](https://github.com/fatedier/frp/commit/12888e9e06c9924683f795e4a1b24f987829924e) Fix CloseNotifyConn.Close function ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/util/net/conn.go` (+1 -1) </details> ### 📄 Description ### WHY The `CloseNotifyConn.Close` function calls itself if the `closeFlag` is equal to `0` which would mean it would immediately swap the `closeFlag` value to `1` and never call `closeFn`. It is unclear what the intent of this call to `cc.Close()` was but I assume it was meant to be a call to close the Conn object instead. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:54:44 -06: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: github-starred/frp#5103
No description provided.