diff --git a/contrib/cmd/recvtty/recvtty.go b/contrib/cmd/recvtty/recvtty.go index e1f615cd7af..32faba0b107 100644 --- a/contrib/cmd/recvtty/recvtty.go +++ b/contrib/cmd/recvtty/recvtty.go @@ -165,15 +165,7 @@ func handleNull(path string) error { return } - // Just do a dumb copy to /dev/null. - devnull, err := os.OpenFile("/dev/null", os.O_RDWR, 0) - if err != nil { - // TODO: Handle this nicely. - return - } - - io.Copy(devnull, master) - devnull.Close() + io.Copy(ioutil.Discard, master) }(conn) } }