The TCP error message for receiving a RST from the peer. The TCP close involves exchanges of FIN packets. But if a peer sends FIN, it must still be prepared to accept input from the local host (see TCP half-close). Thus, if the peer wishes the connection to end now, it can ReSeT it. Immediately afterwards, it can recycle all resources allocated to that connection -- the connection is now closed. The local host might as well do the same.

"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 converseur.