mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4805] frpc reload后,老会话依然存在,导致路由到的还是老服务 #3795
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3795
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @whisperGu on GitHub (May 21, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4805
Bug Description
proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30001
remotePort = 30005
修改为
proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30002
remotePort = 30005
见reload成功,我还是等待了20s

但是使用之前的连接还是能访问到旧会话,开启无痕或等待超时老化后才可以路由到新的服务

为了验证我的想法,我抓取了reload前后两次tcp的连接:
Hello from 30001
本地地址: 127.0.0.1:54530 | 远程地址: 127.0.0.1:30001 | 状态: ESTABLISHED
Hello from 30001
本地地址: 127.0.0.1:54530 | 远程地址: 127.0.0.1:30001 | 状态: ESTABLISHED
当采用这种方式调用才会立即生效:
req, err := http.NewRequest("GET", "http://127.0.0.1:30005/hello", nil)
if err != nil {
t.Fatal(err)
}
req.Close = true // 调用后立即关闭连接
frpc Version
master
frps Version
master
System Architecture
windows/amd64
Configurations
proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30001
remotePort = 30005
修改为
proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30002
remotePort = 30005
Logs
No response
Steps to reproduce
...
Affected area
@github-actions[bot] commented on GitHub (Jun 5, 2025):
Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.