Exits socket when client exits