Fix nil interface

pull/40/head
V2Ray 2015-10-10 12:14:04 +02:00
parent fb41698bbd
commit 01b1f9b898
1 changed files with 9 additions and 0 deletions

View File

@ -53,14 +53,23 @@ func (config *Config) Port() uint16 {
}
func (config *Config) LogConfig() config.LogConfig {
if config.LogConfigValue == nil {
return nil
}
return config.LogConfigValue
}
func (config *Config) InboundConfig() config.ConnectionConfig {
if config.InboundConfigValue == nil {
return nil
}
return config.InboundConfigValue
}
func (config *Config) OutboundConfig() config.ConnectionConfig {
if config.OutboundConfigValue == nil {
return nil
}
return config.OutboundConfigValue
}