/*
NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2020 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
func (c InetdConn) Close() error {
if err := c.r.Close(); err != nil {
- c.w.Close()
+ c.w.Close() // #nosec G104
return err
}
return c.w.Close()
ctx.Umask()
if *inetd {
- os.Stderr.Close()
+ os.Stderr.Close() // #nosec G104
conn := &InetdConn{os.Stdin, os.Stdout}
performSP(ctx, conn, nice)
- conn.Close()
+ conn.Close() // #nosec G104
return
}
ctx.LogD("daemon", nncp.SDS{"addr": conn.RemoteAddr()}, "accepted")
go func(conn net.Conn) {
performSP(ctx, conn, nice)
- conn.Close()
+ conn.Close() // #nosec G104
}(conn)
}
}