Understanding Connection Reset by peer
Connection reset by peer means the TCP stream was abnormally closed from the other end.
A TCP RST was received and the connection is now closed.
This occurs when a packet is sent from our end of the connection but the other end does not recognize the connection;
it will send back a packet with the RST bit set in order to forcibly close the connection.
“Connection reset by peer” is the TCP/IP equivalent of slamming the phone back on the hook.
It’s more polite than merely not replying, leaving one hanging.
But it’s not the FIN-ACK expected of the truly polite TCP/IP.