Finalizing the TCP client