Merge pull request #37 from wpaulino/tor-nil-config

aperture: check tor config nil-ness before access
This commit is contained in:
Olaoluwa Osuntokun
2020-05-20 17:20:41 -07:00
committed by GitHub

View File

@@ -158,7 +158,7 @@ func start() error {
// will only be reached through the onion services, which already
// provide encryption, so running this additional HTTP server should be
// relatively safe.
if cfg.Tor.V2 || cfg.Tor.V3 {
if cfg.Tor != nil && (cfg.Tor.V2 || cfg.Tor.V3) {
torController, err := initTorListener(cfg, etcdClient)
if err != nil {
return err