I have an issue with sockets. I'm creating a socket between my computer and my phone to send messages. When I close the server or the client it sends a FIN packet and it stays in the FIN\_WAIT2 state for like a minute. However, the other side get stuck in the CLOSE\_WAIT state, apparently incapable of closing the socket. I reckon that sockets should be closed instantly, so maybe I should somehow implement a code in the client that closes the socket when the server wants to close it and vice versa. How can I do that?