From 86c2ad78c859bc2172404d7327336bab230b8660 Mon Sep 17 00:00:00 2001 From: fatedier Date: Wed, 13 Mar 2024 21:53:09 +0800 Subject: [PATCH] disable quic-go's receive buffer warning (#4063) --- Release.md | 1 - client/service.go | 3 +++ server/service.go | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Release.md b/Release.md index bf512ca5..e69de29b 100644 --- a/Release.md +++ b/Release.md @@ -1 +0,0 @@ -No feature changes, just a fix for the issue of no released assets in version 0.55.0. diff --git a/client/service.go b/client/service.go index 25e108fc..e24e16d7 100644 --- a/client/service.go +++ b/client/service.go @@ -19,6 +19,7 @@ import ( "errors" "fmt" "net" + "os" "runtime" "sync" "time" @@ -40,6 +41,8 @@ import ( func init() { crypto.DefaultSalt = "frp" + // Disable quic-go's receive buffer warning. + os.Setenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING", "true") } type cancelErr struct { diff --git a/server/service.go b/server/service.go index 12564325..4c3ee125 100644 --- a/server/service.go +++ b/server/service.go @@ -22,6 +22,7 @@ import ( "io" "net" "net/http" + "os" "strconv" "time" @@ -59,6 +60,11 @@ const ( vhostReadWriteTimeout time.Duration = 30 * time.Second ) +func init() { + // Disable quic-go's receive buffer warning. + os.Setenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING", "true") +} + // Server service type Service struct { // Dispatch connections to different handlers listen on same port