Skip to content

Commit

Permalink
修改代码
Browse files Browse the repository at this point in the history
  • Loading branch information
pangdogs committed Mar 31, 2024
1 parent 3c03e95 commit c98a284
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/fufuok/bytespool v1.3.2
github.com/go-redsync/redsync/v4 v4.11.0
github.com/golang/snappy v0.0.4
github.com/gorilla/websocket v1.5.1
github.com/josharian/intern v1.0.0
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021
Expand All @@ -23,6 +24,7 @@ require (
go.etcd.io/etcd/client/v3 v3.5.11
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.18.0
golang.org/x/net v0.20.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)

Expand Down Expand Up @@ -82,7 +84,6 @@ require (
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE=
github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g=
github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs=
Expand Down
2 changes: 1 addition & 1 deletion plugins/gate/cli/client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type ClientOptions struct {
TCPRecvBuf *int // TCP的RecvBuf大小(字节)选项,nil表示使用系统默认值
TCPSendBuf *int // TCP的SendBuf大小(字节)选项,nil表示使用系统默认值
TCPLinger *int // TCP的PLinger选项,nil表示使用系统默认值
WebSocketOrigin string // WebSocket的Origin地址,不填表示和连接目标地址相同
WebSocketOrigin string // WebSocket的Origin地址,不填将会自动生成
TLSConfig *tls.Config // TLS配置,nil表示不使用TLS加密链路
IOTimeout time.Duration // 网络io超时时间
IORetryTimes int // 网络io超时后的重试次数
Expand Down
3 changes: 2 additions & 1 deletion plugins/gate/cli/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"git.golaxy.org/core"
"git.golaxy.org/core/util/generic"
"git.golaxy.org/core/util/types"
"git.golaxy.org/core/util/uid"
"git.golaxy.org/framework/net/gtp/codec"
"git.golaxy.org/framework/util/concurrent"
"golang.org/x/net/websocket"
Expand Down Expand Up @@ -40,7 +41,7 @@ func (ctor *_Connector) connect(ctx context.Context, endpoint string) (client *C

origin := ctor.options.WebSocketOrigin
if origin == "" {
origin = endpoint
origin, _ = url.JoinPath(endpoint, uid.New().String())
}

conf, err := websocket.NewConfig(endpoint, origin)
Expand Down

0 comments on commit c98a284

Please sign in to comment.