Do not close the connection when fd is stdin

Stdin connection will never be reopened once the connection is closed.  This also causes a double free of the connection within shutdown sequence.