While client issue the connect, the physical packet sequence is like
1. SYN (client -> server)
2. SYN+ACK (server->client)
But I found that server will auto send the FIN wjile the client is trying to connect the server.
So the connection will closed immediately while the client is trying to connect the server.
Afterall the client will also send the FIN to close the connection.
The server will respond the error
Socket Error: Transport endpoint is not connected
When a program is terminated using the exit, it will send the reset to the connected socket.