From 01b1f9b8980a7435783f887e8e78dc7ff426085c Mon Sep 17 00:00:00 2001 From: V2Ray Date: Sat, 10 Oct 2015 12:14:04 +0200 Subject: [PATCH] Fix nil interface --- config/json/json.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/json/json.go b/config/json/json.go index 886e52d78..f5105245b 100644 --- a/config/json/json.go +++ b/config/json/json.go @@ -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 }