默认传输通道改为 WSS,http 作为可回退通道
This commit is contained in:
+2
-2
@@ -283,7 +283,7 @@ func (a *App) Shutdown(ctx context.Context) {
|
||||
|
||||
func (a *App) DefaultConfig() Config {
|
||||
return Config{
|
||||
Transport: "http",
|
||||
Transport: "wss",
|
||||
WSSHost: "",
|
||||
SID: 2203,
|
||||
Loops: 20,
|
||||
@@ -606,7 +606,7 @@ func (a *App) emit(event string, data any) {
|
||||
|
||||
func normalizeConfig(cfg Config) Config {
|
||||
if strings.TrimSpace(cfg.Transport) == "" {
|
||||
cfg.Transport = "http"
|
||||
cfg.Transport = "wss"
|
||||
}
|
||||
// WSSHost 留空表示走 launch.queryHttpDns 自动解析,不在这里补默认值。
|
||||
if cfg.Loops <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user