Browse Source

tools/tm-signer-harness: fix listener leak in newTestHarnessListener() (#5850)

Fixes #5837.
pull/5853/head
Erik Grinaker 4 years ago
committed by GitHub
parent
commit
d39eb74daa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      tools/tm-signer-harness/internal/test_harness.go

+ 1
- 0
tools/tm-signer-harness/internal/test_harness.go View File

@ -374,6 +374,7 @@ func newTestHarnessListener(logger log.Logger, cfg TestHarnessConfig) (*privval.
logger.Info("Resolved TCP address for listener", "addr", tcpLn.Addr()) logger.Info("Resolved TCP address for listener", "addr", tcpLn.Addr())
svln = tcpLn svln = tcpLn
default: default:
_ = ln.Close()
logger.Error("Unsupported protocol (must be unix:// or tcp://)", "proto", proto) logger.Error("Unsupported protocol (must be unix:// or tcp://)", "proto", proto)
return nil, newTestHarnessError(ErrInvalidParameters, nil, fmt.Sprintf("Unsupported protocol: %s", proto)) return nil, newTestHarnessError(ErrInvalidParameters, nil, fmt.Sprintf("Unsupported protocol: %s", proto))
} }


Loading…
Cancel
Save