Explorar el Código

disable quic-go's receive buffer warning (#4063)

fatedier hace 1 año
padre
commit
86c2ad78c8
Se han modificado 3 ficheros con 9 adiciones y 1 borrados
  1. 0 1
      Release.md
  2. 3 0
      client/service.go
  3. 6 0
      server/service.go

+ 0 - 1
Release.md

@@ -1 +0,0 @@
-No feature changes, just a fix for the issue of no released assets in version 0.55.0.

+ 3 - 0
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 {

+ 6 - 0
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