mirror of https://github.com/v2ray/v2ray-core
fix nil pointer handling in MemoryStreamConfig conversion.
parent
b3847fb7c0
commit
3d3f0a96d6
|
@ -17,7 +17,10 @@ func ToMemoryStreamConfig(s *StreamConfig) (*MemoryStreamConfig, error) {
|
||||||
mss := &MemoryStreamConfig{
|
mss := &MemoryStreamConfig{
|
||||||
ProtocolName: s.GetEffectiveProtocol(),
|
ProtocolName: s.GetEffectiveProtocol(),
|
||||||
ProtocolSettings: ets,
|
ProtocolSettings: ets,
|
||||||
SocketSettings: s.SocketSettings,
|
}
|
||||||
|
|
||||||
|
if s != nil {
|
||||||
|
mss.SocketSettings = s.SocketSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
if s != nil && s.HasSecuritySettings() {
|
if s != nil && s.HasSecuritySettings() {
|
||||||
|
|
Loading…
Reference in New Issue