mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-14 12:29:36 +03:00
WebSocket config: Add heartbeatPeriod
for client & server (#4065)
https://github.com/XTLS/Xray-core/pull/4065#issuecomment-2502627154 --------- Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
@ -99,7 +99,7 @@ func dialWebSocket(ctx context.Context, dest net.Destination, streamSettings *in
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewConnection(conn, conn.RemoteAddr(), nil), nil
|
||||
return NewConnection(conn, conn.RemoteAddr(), nil, wsSettings.HeartbeatPeriod), nil
|
||||
}
|
||||
|
||||
header := wsSettings.GetRequestHeader()
|
||||
@ -117,7 +117,7 @@ func dialWebSocket(ctx context.Context, dest net.Destination, streamSettings *in
|
||||
return nil, errors.New("failed to dial to (", uri, "): ", reason).Base(err)
|
||||
}
|
||||
|
||||
return NewConnection(conn, conn.RemoteAddr(), nil), nil
|
||||
return NewConnection(conn, conn.RemoteAddr(), nil, wsSettings.HeartbeatPeriod), nil
|
||||
}
|
||||
|
||||
type delayDialConn struct {
|
||||
|
Reference in New Issue
Block a user