pkg/instance: fix Accept error check

This commit is contained in:
Dmitry Vyukov 2018-06-29 12:58:02 +02:00
parent 5c7ca877eb
commit c45c8c2a07

View File

@ -248,7 +248,7 @@ func (inst *inst) testInstance() error {
acceptErr := make(chan error, 1)
go func() {
conn, err := ln.Accept()
if err != nil {
if err == nil {
conn.Close()
}
acceptErr <- err