Handle special case for standard streams
when the getpeername() API fails.