package nncp
import (
+ "errors"
"fmt"
"net"
+ "os"
"time"
"github.com/dustin/go-humanize"
var err error
if addr[0] == '|' {
conn, err = NewPipeConn(addr[1:])
+ } else if addr == UCSPITCPClient {
+ ucspiConn := UCSPIConn{R: os.NewFile(6, "R"), W: os.NewFile(7, "W")}
+ if ucspiConn.R == nil {
+ err = errors.New("no 6 file descriptor")
+ }
+ if ucspiConn.W == nil {
+ err = errors.New("no 7 file descriptor")
+ }
+ conn = ucspiConn
+ addr = UCSPITCPRemoteAddr()
+ if addr == "" {
+ addr = UCSPITCPClient
+ }
} else {
conn, err = net.Dial("tcp", addr)
}
)
})
isGood = true
- conn.Close() // #nosec G104
+ conn.Close()
break
} else {
ctx.LogE("call-started", les, err, func(les LEs) string {
return fmt.Sprintf("Connection to %s (%s)", node.Name, addr)
})
- conn.Close() // #nosec G104
+ conn.Close()
}
}
return