]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/pipe.go
Ignore many errors
[nncp.git] / src / pipe.go
index 1b50573bf75fb983283452f9b2c746f844a7ab2d..a117bc8ac140ebce4d2ae4aaa595b1f0cc96306e 100644 (file)
@@ -65,9 +65,11 @@ func (c PipeConn) SetWriteDeadline(t time.Time) error {
 }
 
 func (c PipeConn) Close() (err error) {
-       c.r.Close()
+       err = c.r.Close()
        err = c.w.Close()
        go c.cmd.Wait()
-       time.AfterFunc(time.Duration(10*time.Second), func() { c.cmd.Process.Kill() })
+       time.AfterFunc(time.Duration(10*time.Second), func() {
+               c.cmd.Process.Kill() // #nosec G104
+       })
        return
 }